summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package/yum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/package/yum.rb')
-rw-r--r--lib/chef/provider/package/yum.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index 022fdcae09..8b7d7a5083 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -197,7 +197,7 @@ class Chef
Chef::Log.debug("#{@new_resource} checking rpm status")
shell_out_with_timeout!("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}", :timeout => Chef::Config[:yum_timeout]).stdout.each_line do |line|
case line
- when /([\w\d_.-]+)\s([\w\d_.-]+)/
+ when /^(\S+)\s(\S+)$/
@current_resource.package_name($1)
@new_resource.version($2)
end