diff options
| author | Xu Cheng | 2015-02-11 16:57:36 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-11 11:02:46 +0000 |
| commit | f640cbac9ed83abab64e4dcb4b630f6765fd2962 (patch) | |
| tree | c0f27c24863f853e1c977cb63f15eef2a30aef74 /Library/Homebrew | |
| parent | 105eaf338257cf3b62d5a22c21c524745ae06d9c (diff) | |
| download | brew-f640cbac9ed83abab64e4dcb4b630f6765fd2962.tar.bz2 | |
brew uses: parse ARGV properly
`ARGV.flag?` = `ARGV.include?` + `ARGV.switch?`
Closes Homebrew/homebrew#36727.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/uses.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index abba88cec..913013dac 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -12,8 +12,8 @@ module Homebrew formulae = (ARGV.include? "--installed") ? Formula.installed : Formula recursive = ARGV.flag? "--recursive" ignores = [] - ignores << "build?" if ARGV.flag? "--skip-build" - ignores << "optional?" if ARGV.flag? "--skip-optional" + ignores << "build?" if ARGV.include? "--skip-build" + ignores << "optional?" if ARGV.include? "--skip-optional" uses = formulae.select do |f| used_formulae.all? do |ff| |
