From 6fa70337e321179867287756ad7161150f8fd03c Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Sat, 11 Dec 2021 22:27:46 +0000 Subject: [PATCH] Fix linuxbrew-core migration not applying to Linuxbrew/homebrew-core --- Library/Homebrew/brew.sh | 2 +- Library/Homebrew/tap.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index b1e1faa11b..09c7fd78b2 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -554,7 +554,7 @@ Your Git executable: $(unset git && type -p ${HOMEBREW_GIT})" unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH HOMEBREW_CORE_REPOSITORY_ORIGIN="$("${HOMEBREW_GIT}" -C "${HOMEBREW_CORE_REPOSITORY}" remote get-url origin 2>/dev/null)" - if [[ "${HOMEBREW_CORE_REPOSITORY_ORIGIN}" =~ /linuxbrew-core(\.git)?$ ]] + if [[ "${HOMEBREW_CORE_REPOSITORY_ORIGIN}" =~ (/linuxbrew|Linuxbrew/homebrew)-core(\.git)?$ ]] then # triggers migration code in update.sh # shellcheck disable=SC2034 diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 0a5315a987..6949b13a54 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -827,7 +827,7 @@ class CoreTap < Tap # @private sig { returns(T::Boolean) } def linuxbrew_core? - remote_repo.to_s.end_with?("/linuxbrew-core") + remote_repo.to_s.end_with?("/linuxbrew-core") || remote_repo == "Linuxbrew/homebrew-core" end # @private