diff options
| author | Mike McQuaid | 2017-11-19 09:09:42 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-19 09:09:42 +0000 |
| commit | 0cd50400c7c1727ec602a9f8dcdc08678622d61e (patch) | |
| tree | 006ca4cb45a5d3bc688466d66104b994ccf26120 | |
| parent | dbc04b4dc701aa1d0aa9197dd12be92c7b1800fc (diff) | |
| parent | 151c2861acad30b587c8aee1c3131643a7fc15ca (diff) | |
| download | brew-0cd50400c7c1727ec602a9f8dcdc08678622d61e.tar.bz2 | |
Merge pull request #3459 from wendorf/show_custom_command_help
Custom commands can show help
| -rw-r--r-- | Library/Homebrew/brew.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index bb663537d..f31224ab2 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -69,6 +69,14 @@ begin end end + unless internal_cmd + # Add contributed commands to PATH before checking. + homebrew_path.append(Tap.cmd_directories) + + # External commands expect a normal PATH + ENV["PATH"] = homebrew_path + end + # Usage instructions should be displayed if and only if one of: # - a help flag is passed AND a command is matched # - a help flag is passed AND there is no command specified @@ -88,14 +96,6 @@ begin system(HOMEBREW_BREW_FILE, "uninstall", "--force", "brew-cask") end - unless internal_cmd - # Add contributed commands to PATH before checking. - homebrew_path.append(Tap.cmd_directories) - - # External commands expect a normal PATH - ENV["PATH"] = homebrew_path - end - if internal_cmd Homebrew.send cmd.to_s.tr("-", "_").downcase elsif which "brew-#{cmd}" |
