diff options
author | Bryan McLellan <btm@opscode.com> | 2012-10-05 15:21:44 -0700 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-10-05 15:21:44 -0700 |
commit | ac16d89b86a2177a607fc7106f7449ebc54879d5 (patch) | |
tree | b65f0f5094fc54a1312a68e7016ae7c7af45c8ff /chef/lib | |
parent | 132b8d20d3d78ce90a11360b6aefd75c14f94eda (diff) | |
download | chef-ac16d89b86a2177a607fc7106f7449ebc54879d5.tar.gz |
CHEF-2826: Escape the regex
Diffstat (limited to 'chef/lib')
-rw-r--r-- | chef/lib/chef/provider/package/pacman.rb | 2 |
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| |