summaryrefslogtreecommitdiff
path: root/chef/lib
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-10-05 15:21:44 -0700
committerBryan McLellan <btm@opscode.com>2012-10-05 15:21:44 -0700
commitac16d89b86a2177a607fc7106f7449ebc54879d5 (patch)
treeb65f0f5094fc54a1312a68e7016ae7c7af45c8ff /chef/lib
parent132b8d20d3d78ce90a11360b6aefd75c14f94eda (diff)
downloadchef-ac16d89b86a2177a607fc7106f7449ebc54879d5.tar.gz
CHEF-2826: Escape the regex
Diffstat (limited to 'chef/lib')
-rw-r--r--chef/lib/chef/provider/package/pacman.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/chef/lib/chef/provider/package/pacman.rb b/chef/lib/chef/provider/package/pacman.rb
index 82cd083225..f81486ae84 100644
--- a/chef/lib/chef/provider/package/pacman.rb
+++ b/chef/lib/chef/provider/package/pacman.rb
@@ -60,7 +60,7 @@ class Chef
repos = pacman.scan(/\[(.+)\]/).flatten
end
- package_repos = repos.join("|")
+ package_repos = repos.map {|r| Regexp.escape(r) }.join('|')
status = popen4("pacman -Ss #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|