Fix Audit check for env :std
				
					
				
			When performing a strict audit of a formula in the core tap, it was possible that the check for `env :std` would not happen.
This commit is contained in:
		
							parent
							
								
									930bbe0b9c
								
							
						
					
					
						commit
						8221e32ad4
					
				@ -948,15 +948,13 @@ module Homebrew
 | 
			
		||||
        problem "`Use :optional` or `:recommended` instead of `#{Regexp.last_match(0)}`"
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      return unless line =~ %r{share(\s*[/+]\s*)(['"])#{Regexp.escape(formula.name)}(?:\2|/)}
 | 
			
		||||
 | 
			
		||||
      problem "Use pkgshare instead of (share#{Regexp.last_match(1)}\"#{formula.name}\")"
 | 
			
		||||
      if line =~ %r{share(\s*[/+]\s*)(['"])#{Regexp.escape(formula.name)}(?:\2|/)}
 | 
			
		||||
        problem "Use pkgshare instead of (share#{Regexp.last_match(1)}\"#{formula.name}\")"
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      return unless @core_tap
 | 
			
		||||
 | 
			
		||||
      return unless line.include?("env :std")
 | 
			
		||||
 | 
			
		||||
      problem "`env :std` in `core` formulae is deprecated"
 | 
			
		||||
      problem "`env :std` in `core` formulae is deprecated" if line.include?("env :std")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def audit_reverse_migration
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user