aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorVlad Shablinsky2015-08-10 17:43:57 +0300
committerMike McQuaid2015-08-10 16:09:26 +0100
commitf88f2b7054ac3ff11a8b0581549776879738e868 (patch)
tree010fddd7bb703343fc34e98a9ea46476ab4154f9 /Library
parent0b854adbf485633603e1d6cf718373e9fc71298a (diff)
downloadbrew-f88f2b7054ac3ff11a8b0581549776879738e868.tar.bz2
update tabs only if core formula installed
Closes Homebrew/homebrew#42745. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.rb1
-rw-r--r--Library/Homebrew/migrator.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index 5c9a63b48..2d7d51eb1 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -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
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb
index 5bd3c6c57..0ad02ab01 100644
--- a/Library/Homebrew/migrator.rb
+++ b/Library/Homebrew/migrator.rb
@@ -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