formula_installer: better handle missing conflict.
Doesn't feel like a good reason to abort installation for users if the formula author has specified a conflict that doesn't exist. Instead, behave more like the `TapFormulaUnavailableError` but print a message telling people to report to the formula authors. Closes https://github.com/Homebrew/homebrew-versions/issues/1327
This commit is contained in:
		
							parent
							
								
									c9fabf57a5
								
							
						
					
					
						commit
						3847db6026
					
				@ -251,10 +251,23 @@ class FormulaInstaller
 | 
			
		||||
      begin
 | 
			
		||||
        f = Formulary.factory(c.name)
 | 
			
		||||
      rescue TapFormulaUnavailableError
 | 
			
		||||
        # If the formula name is in full-qualified name. Let's silently
 | 
			
		||||
        # If the formula name is a fully-qualified name let's silently
 | 
			
		||||
        # ignore it as we don't care about things used in taps that aren't
 | 
			
		||||
        # currently tapped.
 | 
			
		||||
        false
 | 
			
		||||
      rescue FormulaUnavailableError => e
 | 
			
		||||
        # If the formula name doesn't exist any more then complain but don't
 | 
			
		||||
        # stop installation from continuing.
 | 
			
		||||
        opoo <<-EOS.undent
 | 
			
		||||
          #{formula}: #{e.message}
 | 
			
		||||
          'conflicts_with \"#{c.name}\"' should be removed from #{formula.path.basename}.
 | 
			
		||||
        EOS
 | 
			
		||||
        if ARGV.homebrew_developer?
 | 
			
		||||
          raise
 | 
			
		||||
        else
 | 
			
		||||
          $stderr.puts "Please report this to the #{formula.tap} tap!"
 | 
			
		||||
        end
 | 
			
		||||
        false
 | 
			
		||||
      else
 | 
			
		||||
        f.linked_keg.exist? && f.opt_prefix.exist?
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user