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.
This commit is contained in:
		
							parent
							
								
									36a387da26
								
							
						
					
					
						commit
						228239af31
					
				@ -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"
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
    if OS.mac? || ENV["$HOMEBREW_FORCE_HOMEBREW_ORG"]
 | 
			
		||||
      "https://github.com/Homebrew/homebrew-core".freeze
 | 
			
		||||
    else
 | 
			
		||||
    def default_remote
 | 
			
		||||
      "https://github.com/Linuxbrew/homebrew-core"
 | 
			
		||||
      "https://github.com/Linuxbrew/homebrew-core".freeze
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user