update tabs only if core formula installed

Closes Homebrew/homebrew#42745.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Vlad Shablinsky 2015-08-10 17:43:57 +03:00 committed by Mike McQuaid
parent 0b854adbf4
commit f88f2b7054
2 changed files with 2 additions and 1 deletions

View File

@ -55,6 +55,7 @@ module Homebrew
install_tap tap_user, tap_repo
# update tap for each Tab
tabs = dir.subdirs.each.map { |d| Tab.for_keg(Keg.new(d)) }
next if tabs.first.source["tap"] != "Homebrew/homebrew"
tabs.each { |tab| tab.source["tap"] = "#{tap_user}/homebrew-#{tap_repo}" }
tabs.each(&:write)
end if load_tap_migrations

View File

@ -90,7 +90,7 @@ class Migrator
# newname's tap is the same as tap to which oldname migrated, then we
# can perform migrations and the taps for oldname and newname are the same.
elsif TAP_MIGRATIONS && (rec = TAP_MIGRATIONS[formula.oldname]) \
&& rec == formula.tap.sub("homebrew-", "")
&& rec == formula.tap.sub("homebrew-", "") && old_tap == "Homebrew/homebrew"
fix_tabs
true
elsif formula.tap