diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 8cbb4cc5e1..e2a50b1d34 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -30,6 +30,26 @@ class AbstractDownloadStrategy end @unique_token="#{name}-#{version}" unless name.to_s.empty? or name == '__UNKNOWN__' end + + def expand_safe_system_args args + args.each_with_index do |arg, ii| + if arg.is_a? Hash + unless ARGV.verbose? + args[ii] = arg[:quiet_flag] + else + args.delete_at ii + end + return args + end + end + # 2 as default because commands are eg. svn up, git pull + args.insert(2, '-q') unless ARGV.verbose? + return args + end + + def quiet_safe_system *args + safe_system *expand_safe_system_args(args) + end end class CurlDownloadStrategy '-qq'}, @dl chdir when /^\037\213/, /^BZh/ # gzip/bz2 compressed # TODO check if it's really a tar archive @@ -113,9 +133,7 @@ class SubversionDownloadStrategy