Move BuildError and ExceutionError to global.h

More sensible, and fixes brew
This commit is contained in:
Max Howell 2009-11-05 21:37:51 +00:00
parent 6386ce4df5
commit a4e86bb326
2 changed files with 10 additions and 7 deletions

View File

@ -23,13 +23,6 @@
#
require 'download_strategy'
class ExecutionError <RuntimeError
def initialize cmd, args=[]
super "Failure while executing: #{cmd} #{args*' '}"
end
end
class BuildError <ExecutionError
end
class FormulaUnavailableError <RuntimeError
def initialize name
@name = name

View File

@ -54,3 +54,13 @@ MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f
HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})"
class ExecutionError <RuntimeError
def initialize cmd, args=[]
super "Failure while executing: #{cmd} #{args*' '}"
end
end
class BuildError <ExecutionError
end