aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorL. E. Segovia2017-10-24 08:04:49 -0300
committerL. E. Segovia2017-10-24 08:04:49 -0300
commit2bfc7904fb82651bbb08765054f1c916784c29bf (patch)
tree6c5ca42894809fd07af6878ad57bb74456e16ae9 /Library
parenta8ee54a35fb976ad142b1a21a718d43351ea6268 (diff)
downloadbrew-2bfc7904fb82651bbb08765054f1c916784c29bf.tar.bz2
Simplify cask help check
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