cmd/update: check before tapping

Follow-up to ea6c8f7e2dc8f1adf8df9065468d0b37047d4a46
This commit is contained in:
Alex Dunn 2015-11-09 07:30:02 -08:00
parent 95bbd8ef02
commit 745ec8f7c9

View File

@ -83,7 +83,8 @@ module Homebrew
migration = TAP_MIGRATIONS[f]
next unless migration
tap = Tap.fetch(*migration.split("/"))
tap.install
tap.install unless tap.installed?
# update tap for each Tab
tabs = dir.subdirs.map { |d| Tab.for_keg(Keg.new(d)) }
next if tabs.first.source["tap"] != "Homebrew/homebrew"