From 7776f7ee117eb3aa8a3b2a8eed70d96f66f9bba1 Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Fri, 1 Apr 2011 12:30:02 -0700 Subject: [PATCH] Fix brew-audit Fortran check The Fortran regex only allowed for trailing whitespace after: depends_on 'gfortran' This missed conditional dependencies, such as: depends_on 'gfortran' if something? Such a dependency was present in the NetCDF formula. Signed-off-by: Adam Vandenberg --- Library/Homebrew/cmd/audit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 7df226109d..b4cc01bf07 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -107,7 +107,7 @@ def audit_formula_text name, text end if strict? # Formula depends_on gfortran - if text =~ /\s*depends_on\s*(\'|\")gfortran(\'|\")\s*$/ + if text =~ /^\s*depends_on\s*(\'|\")gfortran(\'|\").*/ problems << " * Use ENV.fortran during install instead of depends_on 'gfortran'" end unless name == "gfortran" # Gfortran itself has this text in the caveats