Add HOMEBREW_NO_INSTALL_UPGRADE
				
					
				
			This commit is contained in:
		
							parent
							
								
									56e6710064
								
							
						
					
					
						commit
						b6cb3d2b6a
					
				@ -257,6 +257,10 @@ module Homebrew
 | 
			
		||||
                     "`HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS` days.",
 | 
			
		||||
        boolean:     true,
 | 
			
		||||
      },
 | 
			
		||||
      HOMEBREW_NO_INSTALL_UPGRADE:            {
 | 
			
		||||
        description: "If set, `brew install` will not automatically upgrade installed and out of date formulae",
 | 
			
		||||
        boolean:     true,
 | 
			
		||||
      },
 | 
			
		||||
      HOMEBREW_PRY:                           {
 | 
			
		||||
        description: "If set, use Pry for the `brew irb` command.",
 | 
			
		||||
        boolean:     true,
 | 
			
		||||
 | 
			
		||||
@ -351,7 +351,12 @@ class FormulaInstaller
 | 
			
		||||
      message = <<~EOS
 | 
			
		||||
        #{formula.name} #{formula.linked_version} is already installed
 | 
			
		||||
      EOS
 | 
			
		||||
      if only_deps?
 | 
			
		||||
      if Homebrew::EnvConfig.no_install_upgrade? && formula.outdated? && !formula.head?
 | 
			
		||||
        message += <<~EOS
 | 
			
		||||
          To upgrade to #{formula.pkg_version}, run:
 | 
			
		||||
            brew upgrade #{formula.full_name}
 | 
			
		||||
        EOS
 | 
			
		||||
      elsif only_deps?
 | 
			
		||||
        message = nil
 | 
			
		||||
      else
 | 
			
		||||
        # some other version is already installed *and* linked
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user