Commit ac16d89b authored by Bryan McLellan's avatar Bryan McLellan
Browse files

CHEF-2826: Escape the regex

parent 132b8d20
......@@ -60,7 +60,7 @@ class Chef
repos = pacman.scan(/\[(.+)\]/).flatten
package_repos = repos.join("|")
package_repos = {|r| Regexp.escape(r) }.join('|')
status = popen4("pacman -Ss #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment