Skip to content
Snippets Groups Projects
Commit a3863394 authored by Jack Nagel's avatar Jack Nagel
Browse files

audit: escape dep before regexp interpolation

parent 3afa9c2c
No related branches found
No related tags found
No related merge requests found
......@@ -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"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment