-
-
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
help: show help text for tapped external command #8653
Conversation
I know this is not within the scope of this PR, but... it seems strange that |
@maxim-belkin take a look at #8641 for some discussion (feel free to chime in as well). That was proposed but it was decided that the best option was to add a message letting the user know what happened after the fact. (That issue's been repurposed a little but the initial conversation is about your concern) |
Library/Homebrew/brew.rb
Outdated
@@ -141,9 +141,14 @@ class MissingEnvironmentVariables < RuntimeError; end | |||
end | |||
tap_commands += %W[#{HOMEBREW_BREW_FILE} tap #{possible_tap.name}] | |||
safe_system(*tap_commands) | |||
ohai "Automatically tapped #{possible_tap.name}. To remove, run `brew untap #{possible_tap.name}`" |
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.
The output indicates it was tapped so don't think this is necessary.
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.
Fair, but it does sound like there is some confusion based on the linked issue. However, it's only one person (that I've seen) so I'm willing to remove it. If it comes up more in the future I'd ask that we take another look.
These are "official external commands" so this behaviour is intentional. Perhaps they should/could be migrated to Homebrew/brew instead but until then allowing |
Previously, running e.g. `brew help bundle` when homebrew-bundle was not tapped would tap homebrew-bundle and then run `brew bundle` showing `Error: No Brewfile found` instead of the expected help text.
Very nice and simple 👏🏻 . Thanks for the fix, @Rylan12! |
brew style
with your changes locally?brew tests
with your changes locally?Fixes #8641
Previously, running e.g.
brew help bundle
when homebrew-bundle was not tapped would tap homebrew-bundle and then runbrew bundle
showingError: No Brewfile found
instead of the expected help text.I also added a message that lets the user know how to remove a tap that was automatically added. This was briefly discussed in #8641 but no conclusion was made so if this isn't wanted it can be easily removed.
Before:
After: