Don't warn about tap conflicts during pruning
Fixes Homebrew/homebrew#32710.
This commit is contained in:
parent
e409aa3084
commit
50b900daf3
@ -36,7 +36,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
repair_taps unless ARGV.dry_run?
|
||||
repair_taps(false) unless ARGV.dry_run?
|
||||
|
||||
if ObserverPathnameExtension.total.zero?
|
||||
puts "Nothing pruned" if ARGV.verbose?
|
||||
|
||||
@ -39,7 +39,7 @@ module Homebrew
|
||||
true
|
||||
end
|
||||
|
||||
def link_tap_formula paths
|
||||
def link_tap_formula(paths, warn_about_conflicts=true)
|
||||
ignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue []
|
||||
tapped = 0
|
||||
|
||||
@ -53,7 +53,7 @@ module Homebrew
|
||||
to.make_relative_symlink(path)
|
||||
rescue SystemCallError
|
||||
to = to.resolved_path if to.symlink?
|
||||
opoo <<-EOS.undent
|
||||
opoo <<-EOS.undent if warn_about_conflicts
|
||||
Could not create link for #{Tty.white}#{tap_ref(path)}#{Tty.reset}, as it
|
||||
conflicts with #{Tty.white}#{tap_ref(to)}#{Tty.reset}. You will need to use the
|
||||
fully-qualified name when referring this formula, e.g.
|
||||
@ -70,7 +70,7 @@ module Homebrew
|
||||
tapped
|
||||
end
|
||||
|
||||
def repair_taps
|
||||
def repair_taps(warn_about_conflicts=true)
|
||||
count = 0
|
||||
# prune dead symlinks in Formula
|
||||
Dir.glob("#{HOMEBREW_LIBRARY}/Formula/*.rb") do |fn|
|
||||
@ -88,7 +88,7 @@ module Homebrew
|
||||
each_tap do |user, repo|
|
||||
files = []
|
||||
repo.find_formula { |file| files << file }
|
||||
count += link_tap_formula(files)
|
||||
count += link_tap_formula(files, warn_about_conflicts)
|
||||
end
|
||||
|
||||
puts "Tapped #{count} formula#{plural(count, 'e')}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user