Pass strings, not keg objects, to exec

This commit is contained in:
Jack Nagel 2014-06-26 14:08:17 -05:00
parent 7673c40f25
commit 85b6953816
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ EOS
module Homebrew module Homebrew
def keg_contains string, keg def keg_contains string, keg
if not ARGV.homebrew_developer? if not ARGV.homebrew_developer?
return quiet_system 'fgrep', '--recursive', '--quiet', '--max-count=1', string, keg return quiet_system 'fgrep', '--recursive', '--quiet', '--max-count=1', string, keg.to_s
end end
result = false result = false

View File

@ -18,7 +18,7 @@ module Homebrew
ENV['CLICOLOR'] = nil ENV['CLICOLOR'] = nil
exec 'ls', *ARGV.options_only << HOMEBREW_CELLAR exec 'ls', *ARGV.options_only << HOMEBREW_CELLAR
elsif ARGV.verbose? or not $stdout.tty? elsif ARGV.verbose? or not $stdout.tty?
exec "find", *ARGV.kegs + %w[-not -type d -print] exec "find", *ARGV.kegs.map(&:to_s) + %w[-not -type d -print]
else else
ARGV.kegs.each{ |keg| PrettyListing.new keg } ARGV.kegs.each{ |keg| PrettyListing.new keg }
end end