diff options
| author | Mike McQuaid | 2014-06-26 09:27:22 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2014-06-26 09:27:22 +0100 | 
| commit | e3ac7b4eef028c8fc0d83a6f3f757e2521cf9026 (patch) | |
| tree | 158258752dca3777d7bb1901d027d444531d3ecf /Library/brew.rb | |
| parent | e78af95baf266d10cdb5cc087fec380268397d7a (diff) | |
| download | homebrew-e3ac7b4eef028c8fc0d83a6f3f757e2521cf9026.tar.bz2 | |
brew.rb: handle single usage flag case.
Diffstat (limited to 'Library/brew.rb')
| -rwxr-xr-x | Library/brew.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/Library/brew.rb b/Library/brew.rb index 3a9eccbbe..ca442fba2 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -114,12 +114,13 @@ begin    # Usage instructions should be displayed if and only if one of:    # - a help flag is passed AND an internal command is matched +  # - a help flag is passed AND there is no command specified    # - no arguments are passed    #    # It should never affect external commands so they can handle usage    # arguments themselves. -  if empty_argv || (internal_cmd && help_flag) +  if empty_argv || (help_flag && (cmd.nil? || internal_cmd))      # TODO - `brew help cmd` should display subcommand help      require 'cmd/help'      puts ARGV.usage | 
