Point to a tap when installing or fetching.

When installing or fetching and stuff goes wrong we can't always catch
the error and redirect to the tap. Instead, point to the tap before we
do anything failure-prone and hopefully that'll encourage people to
file issues in the right place. If not we can say that explicitly.

Closes Homebrew/homebrew#33220.
This commit is contained in:
Mike McQuaid 2014-10-19 13:54:00 +01:00
parent dcc8309d1b
commit 356e75487e
3 changed files with 11 additions and 0 deletions

View File

@ -17,6 +17,8 @@ module Homebrew
puts "Fetching: #{bucket * ', '}" if bucket.size > 1
bucket.each do |f|
f.print_tap_action :verb => "Fetching"
if fetch_bottle?(f)
fetch_formula(f.bottle)
else

View File

@ -102,6 +102,8 @@ module Homebrew
end
def install_formula f
f.print_tap_action
fi = FormulaInstaller.new(f)
fi.options = f.build.used_options
fi.ignore_deps = ARGV.ignore_deps?

View File

@ -408,6 +408,13 @@ class Formula
end
end
def print_tap_action options={}
if tap?
verb = options[:verb] || "Installing"
ohai "#{verb} #{name} from #{tap}"
end
end
# True if this formula is provided by Homebrew itself
def core_formula?
path == Formula.path(name)