Homebrew / brew

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

`brew install --quiet` does not suppress warnings for casks #17890

Closed tsedan closed 4 months ago

tsedan commented 4 months ago

brew doctor output

% brew doctor
Your system is ready to brew.

Verification

brew config output

% brew config
HOMEBREW_VERSION: 4.3.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: c3ae0327c01aab461531bfc0fcdfb4dd3a779205
Last commit: 10 days ago
Core tap JSON: 28 Jul 22:50 UTC
Core cask tap JSON: 28 Jul 22:50 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.45.2 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?

I'm trying to write an unattended install script to set up my mac - I want it to install all the brew formulae in a list, and not produce any output even if some of them are already installed.

What happened (include all command output)?

If I run brew install --quiet [already-installed-cask], then brew produces a warning:

% brew install --quiet firefox
Warning: Not upgrading firefox, the latest version is already installed

What did you expect to happen?

I expected that the --quiet option would silence this warning regarding upgrading casks, just as it does for normal formula in issue #9179.

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

brew install firefox
brew install --quiet firefox
apainintheneck commented 4 months ago

What a coincidence, this was updated to match the behavior you describe last week and just hasn't made it into a release yet. We usually make a release every week or two so another one should show up soonish.

See https://github.com/Homebrew/brew/pull/17761