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
|
||||||
end
|
end
|
||||||
|
|
||||||
repair_taps unless ARGV.dry_run?
|
repair_taps(false) unless ARGV.dry_run?
|
||||||
|
|
||||||
if ObserverPathnameExtension.total.zero?
|
if ObserverPathnameExtension.total.zero?
|
||||||
puts "Nothing pruned" if ARGV.verbose?
|
puts "Nothing pruned" if ARGV.verbose?
|
||||||
|
|||||||
@ -39,7 +39,7 @@ module Homebrew
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_tap_formula paths
|
def link_tap_formula(paths, warn_about_conflicts=true)
|
||||||
ignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue []
|
ignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue []
|
||||||
tapped = 0
|
tapped = 0
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ module Homebrew
|
|||||||
to.make_relative_symlink(path)
|
to.make_relative_symlink(path)
|
||||||
rescue SystemCallError
|
rescue SystemCallError
|
||||||
to = to.resolved_path if to.symlink?
|
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
|
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
|
conflicts with #{Tty.white}#{tap_ref(to)}#{Tty.reset}. You will need to use the
|
||||||
fully-qualified name when referring this formula, e.g.
|
fully-qualified name when referring this formula, e.g.
|
||||||
@ -70,7 +70,7 @@ module Homebrew
|
|||||||
tapped
|
tapped
|
||||||
end
|
end
|
||||||
|
|
||||||
def repair_taps
|
def repair_taps(warn_about_conflicts=true)
|
||||||
count = 0
|
count = 0
|
||||||
# prune dead symlinks in Formula
|
# prune dead symlinks in Formula
|
||||||
Dir.glob("#{HOMEBREW_LIBRARY}/Formula/*.rb") do |fn|
|
Dir.glob("#{HOMEBREW_LIBRARY}/Formula/*.rb") do |fn|
|
||||||
@ -88,7 +88,7 @@ module Homebrew
|
|||||||
each_tap do |user, repo|
|
each_tap do |user, repo|
|
||||||
files = []
|
files = []
|
||||||
repo.find_formula { |file| files << file }
|
repo.find_formula { |file| files << file }
|
||||||
count += link_tap_formula(files)
|
count += link_tap_formula(files, warn_about_conflicts)
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Tapped #{count} formula#{plural(count, 'e')}"
|
puts "Tapped #{count} formula#{plural(count, 'e')}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user