-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--quiet conflicts with HOMEBREW_VERBOSE for brew-outdated #5736
Comments
This was fixed in #5738. |
Pretty sure it's not. |
@zmwangx Will reopen when you confirm/paste current error, thanks. |
Well, just the same? Unsetting all $ brew config
HOMEBREW_VERSION: 2.0.2-78-g59aac33-dirty
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 59aac3347acf83e2b7950b8cb20df2b92986f4ec
Last commit: 24 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 5586214830894b3b84be367aa40d855cb7392d4c
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_BINTRAY_KEY: set
HOMEBREW_BINTRAY_USER: zmwangx
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.d8XS1wCxxE/org.macosforge.xquartz:0
HOMEBREW_LOGS: /Users/zmwang/Library/Logs/Homebrew
HOMEBREW_VISUAL: /Users/zmwang/scripts/editor
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.21.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 9.0.1
macOS: 10.14.3-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1
XQuartz: 2.7.11 => /opt/X11 $ HOMEBREW_VERBOSE=1 brew outdated --quiet --debug
Error: Options --quiet and --verbose are mutually exclusive.
/usr/local/Homebrew/Library/Homebrew/cli_parser.rb:241:in `block in check_conflicts'
/usr/local/Homebrew/Library/Homebrew/cli_parser.rb:229:in `each'
/usr/local/Homebrew/Library/Homebrew/cli_parser.rb:229:in `check_conflicts'
/usr/local/Homebrew/Library/Homebrew/cli_parser.rb:259:in `check_constraint_violations'
/usr/local/Homebrew/Library/Homebrew/cli_parser.rb:135:in `parse'
/usr/local/Homebrew/Library/Homebrew/cmd/outdated.rb:35:in `outdated'
/usr/local/Homebrew/Library/Homebrew/brew.rb:102:in `<main>' Haven't looked at the code. |
Okay, looked at the code, found the bug: brew/Library/Homebrew/cli_parser.rb Lines 236 to 238 in 59aac33
Looks like Also commented on the original PR. |
Thanks @zmwangx! |
I have
HOMEBREW_VERBOSE
set for many years, and it never conflicted with the--quiet
flag on the command line. When--quiet
is specified, it simply overridesHOMEBREW_VERBOSE
, as is the convention for handling option vs environment variable in most *nix tools.However, a few weeks ago, 867b155 (CC author @MikeMcQuaid) broke this. Now, using
--quiet
withbrew outdated
whenHOMEBREW_VERBOSE
is set simply results in an error saying--quiet
and--verbose
are mutually exclusive. (This broke my auto update script.) The problem apparently stems from making no distinction betweenHOMEBREW_VERBOSE
and the--verbose
option on the command line.The point is: command line option should override a conflicting env var when necessary, instead of being treated as a conflicting equal.
What you were trying to do (and why)
$ HOMEBREW_VERBOSE=1 brew outdated --quiet
Why? Because I have
HOMEBREW_VERBOSE
set globally, and only override it on the command line as I see fit.What happened
What you expected to happen
No error.
P.S. The help text doesn't help.
Note takes precedence over.
The text was updated successfully, but these errors were encountered: