Skip to content
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

Custom commands can show help #3459

Merged
merged 1 commit into from
Nov 19, 2017

Conversation

wendorf
Copy link
Contributor

@wendorf wendorf commented Nov 19, 2017

#3385 introduced a change to path loading, and loads custom tap paths after trying to render help text. When trying to run something like brew bundle --help, the path is totally missed and bundle ends up getting called directly.

I tried to write an integration test for this in custom-external-command_spec.rb, but figuring out the interactions between the test, brew path loading, and the test fixture was too tough. I need to not specify a custom PATH in order to properly test the path recomposition in brew.rb, but I was unable to do that and still have my custom command detected. If you have guidance for this, I'll gladly update my PR.

We attempted to find the help message for commands before loading custom
commands in the path.
@maelvls
Copy link

maelvls commented Nov 19, 2017

Also broken (with brew tap davidchall/homebrew-test-bot or any other fork) :

brew test-bot --help

@MikeMcQuaid
Copy link
Member

Nice work again @wendorf, thanks for the fix!

@MikeMcQuaid MikeMcQuaid merged commit 0cd5040 into Homebrew:master Nov 19, 2017
@maelvls
Copy link

maelvls commented Nov 19, 2017

Excellent! brew test-bot --help (tap version) and brew bundle --help work again!
Thank you @wendorf

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
@wendorf wendorf deleted the show_custom_command_help branch August 17, 2018 07:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants