formula_installer: refactor source build messages.
This commit is contained in:
		
							parent
							
								
									4db1c1a00f
								
							
						
					
					
						commit
						7fd716ff66
					
				@ -231,12 +231,21 @@ class FormulaInstaller
 | 
			
		||||
      raise CannotInstallFormulaError, "--force-bottle passed but #{formula.full_name} has no bottle!"
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    if Hardware::CPU.arm? && !pour_bottle? && !formula.bottle_unneeded? && !build_from_source? && !build_bottle? && !formula.bottle_disabled?
 | 
			
		||||
      # During the first stage of ARM support, we bail out unless there is a bottle or the user specifically asked to build from source
 | 
			
		||||
      onoe "There is no prebuilt bottle available for #{formula.full_name} on ARM macOS yet"
 | 
			
		||||
      onoe "You can try to install it from source with the --build-from-source flag (or -s)"
 | 
			
		||||
      onoe "However, this means we can offer no support."
 | 
			
		||||
      raise CannotInstallFormulaError, "no bottle is available for #{formula.full_name} on ARM macOS yet"
 | 
			
		||||
    if Homebrew.default_prefix? && !Homebrew::EnvConfig.developer? &&
 | 
			
		||||
       !build_from_source? && !build_bottle? &&
 | 
			
		||||
       formula.tap&.core_tap? && !formula.bottle_unneeded? &&
 | 
			
		||||
       # Integration tests override homebrew-core locations
 | 
			
		||||
       ENV["HOMEBREW_TEST_TMPDIR"].nil? &&
 | 
			
		||||
       !pour_bottle?
 | 
			
		||||
      raise CannotInstallFormulaError, <<~EOS
 | 
			
		||||
        #{formula}: no bottle available!
 | 
			
		||||
        You can try to install from source with e.g.
 | 
			
		||||
          brew install --build-from-source #{formula}
 | 
			
		||||
        Please note building from source is unsupported. You will encounter build
 | 
			
		||||
        failures with some formulae. If you experience any issues please create pull
 | 
			
		||||
        requests instead of asking for help on Homebrew's GitHub, Twitter or any other
 | 
			
		||||
        official channels.
 | 
			
		||||
      EOS
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    type, reason = DeprecateDisable.deprecate_disable_info formula
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user