Skip to content
Snippets Groups Projects
Commit ea2af773 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #1037 from MikeMcQuaid/auto-update-migration-sometimes

update-report: migrate on newer auto-update.
parents d9023a65 2ecd73bc
No related branches found
No related tags found
No related merge requests found
......@@ -267,6 +267,9 @@ update-preinstall() {
[[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return
[[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return
# Allow auto-update migration now we have a fix in place (below in this function).
export HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION="1"
if [[ "$HOMEBREW_COMMAND" = "install" || "$HOMEBREW_COMMAND" = "upgrade" || "$HOMEBREW_COMMAND" = "tap" ]]
then
brew update --preinstall
......
......@@ -100,7 +100,8 @@ module Homebrew
Homebrew.failed = true if ENV["HOMEBREW_UPDATE_FAILED"]
# This should always be the last thing to run (but skip on auto-update).
unless ARGV.include?("--preinstall")
if !ARGV.include?("--preinstall") ||
ENV["HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION"]
migrate_legacy_repository_if_necessary
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment