Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.43k stars 9.74k forks source link

`brew bump` and `brew bump-cask-pr` error out when bumping `wondershare-edrawmax` #13773

Closed p-linnane closed 2 years ago

p-linnane commented 2 years ago

brew config output

HOMEBREW_VERSION: 3.5.10-64-gac94ca6
ORIGIN: https://github.com/Homebrew/brew
HEAD: ac94ca628d5740aa1c5dbe2a86d1ae8c1f7653eb
Last commit: 3 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 374c86922eb299b0df5bc30e6b4d3799c2ee31a3
Core tap last commit: 29 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_FORCE_BREWED_CA_CERTIFICATES: set
HOMEBREW_FORCE_BREWED_GIT: set
HOMEBREW_FORCE_VENDOR_RUBY: set
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.37.2 => /opt/homebrew/opt/git/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.5.1-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1
Rosetta 2: false

brew doctor output

Your system is ready to brew.

Verification

What were you trying to do (and why)?

Trying to bump wondershare-edrawmax. This cask contains both English and Chinese versions, but does not check the hash due to them being updated in place. When bumping the cask the Chinese version is downloaded twice and an inreplace failed error is thrown.

What happened (include all command output)?

brew bump --cask --open-pr wondershare-edrawmax
==> wondershare-edrawmax
Current cask version   :  12.0.1
Latest livecheck version: 12.0.2
Latest Repology version:  present only in Homebrew
Open pull requests:       none
==> Downloading https://cc-download.edrawsoft.cn/edraw-max_cn_full5381.dmg
Already downloaded: /Users/patrick/Library/Caches/Homebrew/downloads/2943ee54123d81b355f48fdb9c914ed42e59e719fbd49955ad70c2e7a21db1c5--edraw-max_cn_full5381.dmg
==> Downloading https://cc-download.edrawsoft.cn/edraw-max_cn_full5381.dmg
Already downloaded: /Users/patrick/Library/Caches/Homebrew/downloads/2943ee54123d81b355f48fdb9c914ed42e59e719fbd49955ad70c2e7a21db1c5--edraw-max_cn_full5381.dmg
==> Downloading https://download.edrawsoft.com/edraw-max_full5380.dmg
Already downloaded: /Users/patrick/Library/Caches/Homebrew/downloads/e246282d1aab980a9ec15005ffc4a49eaeefe8fd2fbc775418f3a5de22fb49e3--edraw-max_full5380.dmg
==> replace /version\s+["']12\.0\.1["']/m with "version \"12.0.2\""
==> replace "no_check" with "85e633f0879e2942cf687f6295617c30dd2714fa29946a2adea7e8e53d42425d"
==> replace "no_check" with "765f00c68267d4cb830a4cc3c0afe9404eecb0e5c8c64dd9920173ad58f50729"
Error: inreplace failed
/opt/homebrew/Library/Taps/homebrew/homebrew-cask/Casks/wondershare-edrawmax.rb:
  expected replacement of "no_check" with "765f00c68267d4cb830a4cc3c0afe9404eecb0e5c8c64dd9920173ad58f50729"

What did you expect to happen?

Cask version is bumped as usual

Step-by-step reproduction instructions (by running brew commands)

brew bump --cask --open-pr wondershare-edrawmax or brew bump-cask-pr --version=12.0.2 wondershare-edrawmax both generate the relevant error.

carlocab commented 2 years ago

@Homebrew/cask

p-linnane commented 2 years ago

It seems sort of similar to what @Rylan12 fixed in https://github.com/Homebrew/brew/issues/13687. I'm seeing the multiple attempts to pull the same file in the output I posted above just like in that previous issue. Wondering if it has something to do with the multi language/no checksum combination, since that's an edge case.