From f640cbac9ed83abab64e4dcb4b630f6765fd2962 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 11 Feb 2015 16:57:36 +0800 Subject: [PATCH] brew uses: parse ARGV properly `ARGV.flag?` = `ARGV.include?` + `ARGV.switch?` Closes Homebrew/homebrew#36727. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/uses.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index abba88cec5..913013daca 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|