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.
This commit is contained in:
parent
690474dd3b
commit
6071e3b54c
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user