aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-04-25 09:13:36 +0100
committerMike McQuaid2017-04-25 09:13:36 +0100
commit228239af31f1c5f3507884fa6b89d060644ef2a8 (patch)
tree1693dc2709854ec403af9be300918a2e5122924b /Library
parent36a387da26f56f49fb9153c652127fce76225f3c (diff)
downloadbrew-228239af31f1c5f3507884fa6b89d060644ef2a8.tar.bz2
Allow forcing Homebrew GitHub organisation.
On Linux this defaults to Linuxbrew but in some cases (i.e. a Linux machine performing uploads for Homebrew) we want to allow this to be overridden back to the defaults. Relies on a change incoming to `brew test-bot` to set this there.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.sh2
-rw-r--r--Library/Homebrew/tap.rb12
2 files changed, 6 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 197a99f2e..77a5c1cd2 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -23,7 +23,7 @@ git() {
}
git_init_if_necessary() {
- if [[ -n "$HOMEBREW_MACOS" ]]
+ if [[ -n "$HOMEBREW_MACOS" ]] || [[ -n "$HOMEBREW_FORCE_HOMEBREW_ORG" ]]
then
BREW_OFFICIAL_REMOTE="https://github.com/Homebrew/brew"
CORE_OFFICIAL_REMOTE="https://github.com/Homebrew/homebrew-core"
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb
index c3af73c7e..e386db7b8 100644
--- a/Library/Homebrew/tap.rb
+++ b/Library/Homebrew/tap.rb
@@ -526,13 +526,11 @@ end
# A specialized {Tap} class for the core formulae
class CoreTap < Tap
- if OS.mac?
- def default_remote
- "https://github.com/Homebrew/homebrew-core"
- end
- else
- def default_remote
- "https://github.com/Linuxbrew/homebrew-core"
+ def default_remote
+ if OS.mac? || ENV["$HOMEBREW_FORCE_HOMEBREW_ORG"]
+ "https://github.com/Homebrew/homebrew-core".freeze
+ else
+ "https://github.com/Linuxbrew/homebrew-core".freeze
end
end