aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb
index 8d738637b..39467ce9e 100644
--- a/Library/Homebrew/brew.rb
+++ b/Library/Homebrew/brew.rb
@@ -78,15 +78,10 @@ begin
# - a help flag is passed AND a command is matched
# - a help flag is passed AND there is no command specified
# - no arguments are passed
- if empty_argv || help_flag
+ # - if cmd is Cask, let Cask handle the help command instead
+ if (empty_argv || help_flag ) && cmd != "cask"
require "cmd/help"
- if cmd == "cask"
- # Let Cask handle the help command
- Homebrew.send cmd.to_s.tr("-", "_").downcase
- exit 0
- else
- Homebrew.help cmd, empty_argv: empty_argv
- end
+ Homebrew.help cmd, empty_argv: empty_argv
# `Homebrew.help` never returns, except for external/unknown commands.
end