diff options
| author | Jack Nagel | 2013-07-22 22:53:43 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-07-22 22:53:43 -0500 |
| commit | a3863394c0cbf38255d9b71cb589710729bbbcc6 (patch) | |
| tree | fe050c5e2038a48d868e2c97f3cc0eb67b08dd7d /Library | |
| parent | 3afa9c2ceb26961e67333150e73b75eaa96050d5 (diff) | |
| download | brew-a3863394c0cbf38255d9b71cb589710729bbbcc6.tar.bz2 | |
audit: escape dep before regexp interpolation
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 3d2321256..a49d01e06 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -511,6 +511,7 @@ class FormulaAuditor end def audit_conditional_dep(dep, condition, line) + dep = Regexp.escape(dep) case condition when /if build\.include\? ['"]with-#{dep}['"]$/, /if build\.with\? ['"]#{dep}['"]$/ problem %{Replace #{line.inspect} with "depends_on #{quote_dep(dep)} => :optional"} |
