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:
parent
dcc8309d1b
commit
356e75487e
@ -17,6 +17,8 @@ module Homebrew
|
|||||||
|
|
||||||
puts "Fetching: #{bucket * ', '}" if bucket.size > 1
|
puts "Fetching: #{bucket * ', '}" if bucket.size > 1
|
||||||
bucket.each do |f|
|
bucket.each do |f|
|
||||||
|
f.print_tap_action :verb => "Fetching"
|
||||||
|
|
||||||
if fetch_bottle?(f)
|
if fetch_bottle?(f)
|
||||||
fetch_formula(f.bottle)
|
fetch_formula(f.bottle)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -102,6 +102,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def install_formula f
|
def install_formula f
|
||||||
|
f.print_tap_action
|
||||||
|
|
||||||
fi = FormulaInstaller.new(f)
|
fi = FormulaInstaller.new(f)
|
||||||
fi.options = f.build.used_options
|
fi.options = f.build.used_options
|
||||||
fi.ignore_deps = ARGV.ignore_deps?
|
fi.ignore_deps = ARGV.ignore_deps?
|
||||||
|
|||||||
@ -408,6 +408,13 @@ class Formula
|
|||||||
end
|
end
|
||||||
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
|
# True if this formula is provided by Homebrew itself
|
||||||
def core_formula?
|
def core_formula?
|
||||||
path == Formula.path(name)
|
path == Formula.path(name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user