Move BuildError and ExceutionError to global.h
More sensible, and fixes brew
This commit is contained in:
parent
6386ce4df5
commit
a4e86bb326
@ -23,13 +23,6 @@
|
|||||||
#
|
#
|
||||||
require 'download_strategy'
|
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
|
class FormulaUnavailableError <RuntimeError
|
||||||
def initialize name
|
def initialize name
|
||||||
@name = name
|
@name = name
|
||||||
|
|||||||
@ -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
|
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})"
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user