exceptions: use Formula#full_name
This commit is contained in:
parent
12f0472a7d
commit
3ac2b7b1c6
@ -100,7 +100,7 @@ class CannotInstallFormulaError < RuntimeError; end
|
|||||||
|
|
||||||
class FormulaInstallationAlreadyAttemptedError < RuntimeError
|
class FormulaInstallationAlreadyAttemptedError < RuntimeError
|
||||||
def initialize(formula)
|
def initialize(formula)
|
||||||
super "Formula installation already attempted: #{formula.name}"
|
super "Formula installation already attempted: #{formula.full_name}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class FormulaConflictError < RuntimeError
|
|||||||
|
|
||||||
def message
|
def message
|
||||||
message = []
|
message = []
|
||||||
message << "Cannot install #{formula.name} because conflicting formulae are installed.\n"
|
message << "Cannot install #{formula.full_name} because conflicting formulae are installed.\n"
|
||||||
message.concat conflicts.map { |c| conflict_message(c) } << ""
|
message.concat conflicts.map { |c| conflict_message(c) } << ""
|
||||||
message << <<-EOS.undent
|
message << <<-EOS.undent
|
||||||
Please `brew unlink #{conflicts.map(&:name)*' '}` before continuing.
|
Please `brew unlink #{conflicts.map(&:name)*' '}` before continuing.
|
||||||
@ -193,7 +193,7 @@ class BuildError < RuntimeError
|
|||||||
ohai "ENV"
|
ohai "ENV"
|
||||||
Homebrew.dump_build_env(env)
|
Homebrew.dump_build_env(env)
|
||||||
puts
|
puts
|
||||||
onoe "#{formula.name} #{formula.version} did not build"
|
onoe "#{formula.full_name} #{formula.version} did not build"
|
||||||
unless (logs = Dir["#{formula.logs}/*"]).empty?
|
unless (logs = Dir["#{formula.logs}/*"]).empty?
|
||||||
puts "Logs:"
|
puts "Logs:"
|
||||||
puts logs.map{|fn| " #{fn}"}.join("\n")
|
puts logs.map{|fn| " #{fn}"}.join("\n")
|
||||||
@ -212,7 +212,7 @@ end
|
|||||||
class CompilerSelectionError < RuntimeError
|
class CompilerSelectionError < RuntimeError
|
||||||
def initialize(formula)
|
def initialize(formula)
|
||||||
super <<-EOS.undent
|
super <<-EOS.undent
|
||||||
#{formula.name} cannot be built with any available compilers.
|
#{formula.full_name} cannot be built with any available compilers.
|
||||||
To install this formula, you may need to:
|
To install this formula, you may need to:
|
||||||
brew install gcc
|
brew install gcc
|
||||||
EOS
|
EOS
|
||||||
@ -273,7 +273,7 @@ end
|
|||||||
|
|
||||||
class ResourceMissingError < ArgumentError
|
class ResourceMissingError < ArgumentError
|
||||||
def initialize(formula, resource)
|
def initialize(formula, resource)
|
||||||
super "#{formula.name} does not define resource #{resource.inspect}"
|
super "#{formula.full_name} does not define resource #{resource.inspect}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user