update: automatically tap migrated formulae.
When a formula is removed from core and installed let's tap it so users can get updates without caring which tap we want to put things in. This should allow us to migrate a lot of things to taps. Closes Homebrew/homebrew#23760.
This commit is contained in:
parent
1c5b1d745e
commit
d31e069ed3
@ -1,5 +1,6 @@
|
||||
require 'cmd/tap'
|
||||
require 'cmd/untap'
|
||||
require 'tap_migrations'
|
||||
|
||||
module Homebrew extend self
|
||||
def update
|
||||
@ -55,6 +56,16 @@ module Homebrew extend self
|
||||
Homebrew.unlink_tap_formula(report.removed_tapped_formula)
|
||||
Homebrew.link_tap_formula(report.new_tapped_formula)
|
||||
|
||||
# automatically tap any migrated formulae's new tap
|
||||
report.select_formula(:D).each do |f|
|
||||
next unless Formula.factory(f).installed?
|
||||
tap_user, tap_repo = TAP_MIGRATIONS[f].split '/'
|
||||
begin
|
||||
install_tap tap_user, tap_repo
|
||||
rescue AlreadyTappedError => e
|
||||
end
|
||||
end
|
||||
|
||||
if report.empty?
|
||||
puts "Already up-to-date."
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user