diff options
| author | Mike McQuaid | 2017-03-30 19:18:40 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-03-30 19:18:40 +0100 |
| commit | 45357ef0dd2bfc0bf8d957fd890e030fd9f7cf6a (patch) | |
| tree | 216e4970c704d78120c519a524d4f644f6268c24 /Library/Homebrew/migrator.rb | |
| parent | 7d66e299278b687c67c165960d99921d92ff1753 (diff) | |
| download | brew-45357ef0dd2bfc0bf8d957fd890e030fd9f7cf6a.tar.bz2 | |
Fix handling of tap migrations to new cask names.
Need to check for two `/`s rather than one.
Diffstat (limited to 'Library/Homebrew/migrator.rb')
| -rw-r--r-- | Library/Homebrew/migrator.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb index 3eb7f833e..a58ca2059 100644 --- a/Library/Homebrew/migrator.rb +++ b/Library/Homebrew/migrator.rb @@ -122,6 +122,13 @@ class Migrator end def from_same_taps? + new_tap = if old_tap + if migrate_tap = old_tap.tap_migrations[formula.oldname] + new_tap_user, new_tap_repo, = migrate_tap.split("/") + "#{new_tap_user}/#{new_tap_repo}" + end + end + if formula.tap == old_tap true # Homebrew didn't use to update tabs while performing tap-migrations, @@ -129,7 +136,7 @@ class Migrator # so we check if there is an entry about oldname migrated to tap and if # 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 formula.tap && old_tap && formula.tap == old_tap.tap_migrations[formula.oldname] + elsif formula.tap && old_tap && formula.tap == new_tap fix_tabs true else |
