summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package
diff options
context:
space:
mode:
authorpiyushawasthi <piyush.awasthi@msystechnologies.com>2017-06-09 19:37:45 +0530
committerpiyushawasthi <piyush.awasthi@msystechnologies.com>2017-06-09 19:37:45 +0530
commit4f9701ff91cc8382aee138d825b847d3d7dbed9f (patch)
treea9a53f6759bac132678087b31669f372e0da66a1 /lib/chef/provider/package
parentee29cedc0bb46ed8b4f678653d523caa9dafdd9d (diff)
downloadchef-4f9701ff91cc8382aee138d825b847d3d7dbed9f.tar.gz
Fix chomp error for nil class
Signed-off-by: piyushawasthi <piyush.awasthi@msystechnologies.com>
Diffstat (limited to 'lib/chef/provider/package')
-rw-r--r--lib/chef/provider/package/chocolatey.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb
index 29b9f0d322..a1ec4504a0 100644
--- a/lib/chef/provider/package/chocolatey.rb
+++ b/lib/chef/provider/package/chocolatey.rb
@@ -257,7 +257,7 @@ EOS
choco_command(*args).stdout.each_line do |line|
next if line.start_with?("Chocolatey v")
name, version = line.split("|")
- hash[name.downcase] = version.chomp
+ hash[name.downcase] = version&.chomp
end
hash
end