audit: only set up the build environment once
This commit is contained in:
		
							parent
							
								
									57534cf7b2
								
							
						
					
					
						commit
						fedf9ddae3
					
				@ -7,6 +7,8 @@ module Homebrew extend self
 | 
			
		||||
    formula_count = 0
 | 
			
		||||
    problem_count = 0
 | 
			
		||||
 | 
			
		||||
    ENV.setup_build_environment
 | 
			
		||||
 | 
			
		||||
    ff = if ARGV.named.empty?
 | 
			
		||||
      Formula
 | 
			
		||||
    else
 | 
			
		||||
@ -295,9 +297,7 @@ class FormulaAuditor
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def audit_patches
 | 
			
		||||
    # Some formulae use ENV in patches, so set up an environment
 | 
			
		||||
    ENV.with_build_environment do
 | 
			
		||||
      Patches.new(f.patches).select { |p| p.external? }.each do |p|
 | 
			
		||||
    Patches.new(f.patches).select(&:external?).each do |p|
 | 
			
		||||
      case p.url
 | 
			
		||||
      when %r[raw\.github\.com], %r[gist\.github\.com/raw]
 | 
			
		||||
        unless p.url =~ /[a-fA-F0-9]{40}/
 | 
			
		||||
@ -308,7 +308,6 @@ class FormulaAuditor
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def audit_text
 | 
			
		||||
    if text =~ /<(Formula|AmazonWebServicesFormula|ScriptFileFormula|GithubGistFormula)/
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user