-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Description
When running brew cu --all, if some casks fail to download, the command exits with code 0 and stops updating other packages.
Steps to Reproduce
- Run
brew cu --all(in environment where some downloads may be blocked, e.g., corporate VPN) - Observe download failures for some casks due to network restrictions
- Remaining packages are not installed.
Expected Behavior
- Command should exit with non-zero code when any cask fails to download
- Remaining packages are still updated
Actual Behavior
- Command exits with code 0 even when downloads fail
- No updates are installed
Note: The native brew upgrade --cask --greedy command continues to install other casks when some downloads fail, which is the expected behavior. However, brew cu --all appears to halt and not proceed with remaining casks after a download failure.
Example Output
Details
~ brew cu --all
==> Options
Include auto-update (-a): true
Include latest (-f): false
==> Updating Homebrew
==> Updating Homebrew...
Already up-to-date.
==> Finding outdated apps
Cask Current Latest A/U Result
1/33 alt-tab 7.38.0 7.38.0 Y [ OK ]
2/33 bettertouchtool@alpha 5.803 5.803 Y [ OK ]
3/33 chatgpt 1.2025.330 1.2025.330 Y [ OK ]
4/33 claude 0.14.10 0.14.10 Y [ OK ]
5/33 claude-code 2.0.62 2.0.62 [ OK ]
6/33 coconutbattery 4.1.1 4.1.1 Y [ OK ]
7/33 cursor 2.1.50 2.1.50 Y [ OK ]
8/33 daisydisk 4.32 4.32 Y [ OK ]
9/33 deepl 25.11.13142470 25.11.23262385 Y [ FORCED ]
10/33 detectx-swift 1.0982 1.0982 Y [ OK ]
11/33 font-hack-nerd-font 3.4.0 3.4.0 [ OK ]
12/33 ghostty 1.2.3 1.2.3 Y [ OK ]
13/33 istat-menus 7.20 7.20 Y [ OK ]
14/33 iterm2 3.6.6 3.6.6 Y [ OK ]
15/33 itermbrowserplugin 1.0 1.0 [ OK ]
16/33 itsycal 0.15.8 0.15.8 Y [ OK ]
17/33 keepassxc 2.7.11 2.7.11 [ OK ]
18/33 knockknock 3.1.0 3.1.0 [ OK ]
19/33 logi-options+ 1.98.809639 1.98.809639 Y [ OK ]
20/33 logitech-g-hub 2025.8.789376 2025.9.807502 Y [ FORCED ]
21/33 mathpix-snipping-tool 3.4.16.2 3.4.16.2 Y [ OK ]
22/33 miniconda py313_25.9.1 py313_25.9.1 Y [ FORCED ]
23/33 ollama-app 0.13.2 0.13.2 Y [ OK ]
24/33 podman-desktop 1.23.1 1.23.1 Y [ OK ]
25/33 postman 11.73.5 11.75.1 Y [ FORCED ]
26/33 pycharm-ce 2025.2.5 2025.2.5 Y [ OK ]
27/33 shortcat 0.12.2 0.12.2 Y [ OK ]
28/33 sourcetree 4.2.15 4.2.15 Y [ FORCED ]
29/33 spotify 1.2.77.358 1.2.78.418 Y [ FORCED ]
30/33 sublime-text 4200 4200 Y [ OK ]
31/33 telegram 12.2 12.3 Y [ FORCED ]
32/33 visual-studio-code 1.106.3 1.106.3 Y [ OK ]
33/33 zed 0.214.7 0.215.3 Y [ FORCED ]
==> Found outdated apps
Cask Current Latest A/U Result
1/8 deepl 25.11.13142470 25.11.23262385 Y [ FORCED ]
2/8 logitech-g-hub 2025.8.789376 2025.9.807502 Y [ FORCED ]
3/8 miniconda py313_25.9.1 py313_25.9.1 Y [ FORCED ]
4/8 postman 11.73.5 11.75.1 Y [ FORCED ]
5/8 sourcetree 4.2.15 4.2.15 Y [ FORCED ]
6/8 spotify 1.2.77.358 1.2.78.418 Y [ FORCED ]
7/8 telegram 12.2 12.3 Y [ FORCED ]
8/8 zed 0.214.7 0.215.3 Y [ FORCED ]
Do you want to upgrade 8 apps or enter [i]nteractive mode [y/i/N]? y
==> Upgrading 8 apps
==> Fetching downloads for: deepl, logitech-g-hub, miniconda, postman, sourcetree, spotify, telegram and zed
✔︎ API Source logitech-g-hub.rb [Verifying 1.7KB/ 1.7KB]
✔︎ API Source miniconda.rb [Verifying 2.0KB/ 2.0KB]
✔︎ Cask logitech-g-hub (2025.9.807502) [Verifying 10.8MB/ 10.8MB]
✔︎ Cask spotify (1.2.78.418) [Verifying 146.1MB/146.1MB]
✔︎ Cask postman (11.75.1) [Verifying 123.8MB/123.8MB]
✔︎ Cask miniconda (py313_25.9.1-3) [Verifying 118.0MB/118.0MB]
✔︎ Cask sourcetree (4.2.15,303) [Verifying 67.6MB/ 67.6MB]
✘ Cask deepl (25.11.23262385)
Error: Download failed on Cask 'deepl' with message: Download failed: https://www.deepl.com/macos/download/25.11/23262385/DeepL.dmg
✘ Cask telegram (12.3,277495)
Error: Download failed on Cask 'telegram' with message: Download failed: https://osx.telegram.org/updates/Telegram-12.3.277495.app.zip [Downloading 152.1MB/-------]
✔︎ Cask zed (0.215.3) [Verifying 152.1MB/152.1MB]
~ echo $? returns 0
0 returns 0
Impact
- Remaining casks are not updated at all
Environment
- macOS: 26.1
- Homebrew version: 5.0.5
- buo/cask-upgrade version: (latest from tap)
Additional Context
This appears to be a recent issue, possibly related to changes in Homebrew 5.x exit code handling. It used to work just fine before.
Proposed Solution
Track download failures and exit with appropriate error code when any cask fails to download. May need to adapt to recent
Homebrew API/behavior changes.