diff options
| author | Jack Nagel | 2013-12-02 16:14:43 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-02 16:22:40 -0600 |
| commit | b9030a7dbb09eabcc686875469cadee6fbdbb640 (patch) | |
| tree | b8b95c7054330c933338e37dd6a6e54ce8b2c92f /Library/Homebrew/cmd | |
| parent | f0cea61ee688809ebdd6a84075e5f147e434365a (diff) | |
| download | homebrew-b9030a7dbb09eabcc686875469cadee6fbdbb640.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/Homebrew/cmd')
| -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 |
