Ask the formula object for the opt path
This commit is contained in:
		
							parent
							
								
									7a75bbd85a
								
							
						
					
					
						commit
						87e7735012
					
				@ -192,8 +192,9 @@ module SharedEnvExtension
 | 
			
		||||
    version = name[GNU_GCC_REGEXP, 1]
 | 
			
		||||
    gcc_version_name = "gcc#{version.delete('.')}"
 | 
			
		||||
 | 
			
		||||
    if HOMEBREW_PREFIX.join("opt", "gcc", "bin", name).exist?
 | 
			
		||||
      Formulary.factory("gcc")
 | 
			
		||||
    gcc = Formulary.factory("gcc")
 | 
			
		||||
    if gcc.opt_bin.join(name).exist?
 | 
			
		||||
      gcc
 | 
			
		||||
    else
 | 
			
		||||
      Formulary.factory(gcc_version_name)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user