diff options
| author | Jack Nagel | 2013-12-02 16:14:43 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-02 16:22:40 -0600 |
| commit | 6071e3b54cf0ad2309fb7d5238c3557c724f415a (patch) | |
| tree | e5cb4e6cd1569567fca73729c18f009208846d40 /Library | |
| parent | 690474dd3ba39319a4009506c22f269610d6bff2 (diff) | |
| download | brew-6071e3b54cf0ad2309fb7d5238c3557c724f415a.tar.bz2 | |
Fix tap migrations
When a `brew update` pulls down additions to tap_migrations.rb and the
removed formulae in the same update, the migrations will never run,
because tap_migrations.rb is loaded before the update takes place. Fix
this by loading it after the update.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index 68298fd52..f6e90f6c9 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -1,6 +1,5 @@ require 'cmd/tap' require 'cmd/untap' -require 'tap_migrations' module Homebrew extend self def update @@ -66,7 +65,7 @@ module Homebrew extend self install_tap tap_user, tap_repo rescue AlreadyTappedError => e end - end + end if load_tap_migrations if report.empty? puts "Already up-to-date." @@ -91,6 +90,11 @@ module Homebrew extend self raise end + def load_tap_migrations + require 'tap_migrations' + rescue LoadError + false + end end class Updater |
