diff options
| author | Max Howell | 2011-09-19 23:29:07 +0100 |
|---|---|---|
| committer | Max Howell | 2011-09-19 23:30:10 +0100 |
| commit | 6bd47cf0f96447e5ee0925eea34e406bdaed7ffa (patch) | |
| tree | 46934d2c6eeb62ebdce6daf303b517c809c3e731 /Library/Homebrew/utils.rb | |
| parent | 1dc0775a15302830725d45e9912f61e0fdfb5596 (diff) | |
| download | brew-6bd47cf0f96447e5ee0925eea34e406bdaed7ffa.tar.bz2 | |
Only try mirrors for CurlDownloadStrategies
Also adjust output text slightly for prettiness.
A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 485995615..dc7bf5d42 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -92,7 +92,7 @@ end def safe_system cmd, *args unless Homebrew.system cmd, *args args = args.map{ |arg| arg.to_s.gsub " ", "\\ " } * " " - raise "Failure while executing: #{cmd} #{args}" + raise ErrorDuringExecution, "Failure while executing: #{cmd} #{args}" end end @@ -106,13 +106,13 @@ end def curl *args curl = Pathname.new '/usr/bin/curl' - raise "#{curl} is not an executable!" unless curl.exist? and curl.executable? + raise "#{curl} is not executable" unless curl.exist? and curl.executable? args = [HOMEBREW_CURL_ARGS, HOMEBREW_USER_AGENT, *args] # See https://github.com/mxcl/homebrew/issues/6103 args << "--insecure" if MacOS.version < 10.6 - raise DownloadError.new curl, args, $? unless Homebrew.system curl, *args + safe_system curl, *args end def puts_columns items, star_items=[] |
