-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
cmd/list.rb: --formula and --cask as default option on TTY #8851
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
Conversation
I suggested this: #8668 (comment) |
Basically:
|
Sorry, did not notice your comment. But I have replied here #8668 (comment) |
Probably the |
Also, I have a question, how to modify manpages? Should I write the changes in |
Yes, just run |
Also, how to test only |
|
That's strange, |
Library/Homebrew/cmd/list.rb
Outdated
safe_system "ls", *ls_args, HOMEBREW_CELLAR | ||
else | ||
safe_system "ls", *ls_args, HOMEBREW_CELLAR | ||
print list_casks(args: args) unless args.formula? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print list_casks(args: args) unless args.formula? | |
list_casks(args: args) unless args.formula? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, tests throw error because list returns list_casks and not list Cellar, right?
cmd/list.rb: --formula, --cask as default TTY: cmd/list.rb: proper deprecated message on non TTY outputs update manpage update zsh completion updated manpages/brew.1 update tests return list_casks list_spec.rb: not output to stderr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is 💚. I'm 👍🏻 once @reitermarkus is.
Homebrew has begun emitting a deprecation warning when checking for requirements on osx as of Homebrew/brew#8851 Example output when installing a Ruby: ``` rvm install 2.7.2 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.15/x86_64/ruby-2.7.2. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for osx. Warning: Calling `brew list` to only list formulae is deprecated! Use `brew list --formula` instead. ... (repeated ~12 times on my system) Warning: Calling `brew list` to only list formulae is deprecated! Use `brew list --formula` instead. Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date. Requirements installation successful. ... ``` This does not impact the execution, and the command completes successfully, however it's extra noise for the end user. The `--formula` flag was added back in August in Homebrew/brew#8229 and brew will auto-update in most scenarios - but users who have set the environment variable to not auto-update brew may fail this command with: Error: ambiguous option: --formula I do not have any insight when brew may handle the deprecation warning and remove the existing behavior. Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@@ -86,7 +86,13 @@ def list | |||
ls_args << "-r" if args.r? | |||
ls_args << "-t" if args.t? | |||
|
|||
safe_system "ls", *ls_args, HOMEBREW_CELLAR | |||
if !$stdout.tty? && !args.formula? | |||
odeprecated "`brew list` to only list formulae", "`brew list --formula`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brew style
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?Added clarifications suggested in #8668 (comment)
Fixes #8910