exceptions: use Formula#full_name

This commit is contained in:
Xu Cheng 2015-05-27 22:16:48 +08:00
parent 12f0472a7d
commit 3ac2b7b1c6

View File

@ -100,7 +100,7 @@ class CannotInstallFormulaError < RuntimeError; end
class FormulaInstallationAlreadyAttemptedError < RuntimeError
def initialize(formula)
super "Formula installation already attempted: #{formula.name}"
super "Formula installation already attempted: #{formula.full_name}"
end
end
@ -132,7 +132,7 @@ class FormulaConflictError < RuntimeError
def 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 << <<-EOS.undent
Please `brew unlink #{conflicts.map(&:name)*' '}` before continuing.
@ -193,7 +193,7 @@ class BuildError < RuntimeError
ohai "ENV"
Homebrew.dump_build_env(env)
puts
onoe "#{formula.name} #{formula.version} did not build"
onoe "#{formula.full_name} #{formula.version} did not build"
unless (logs = Dir["#{formula.logs}/*"]).empty?
puts "Logs:"
puts logs.map{|fn| " #{fn}"}.join("\n")
@ -212,7 +212,7 @@ end
class CompilerSelectionError < RuntimeError
def initialize(formula)
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:
brew install gcc
EOS
@ -273,7 +273,7 @@ end
class ResourceMissingError < ArgumentError
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