summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-06-12 09:28:16 -0700
committerGitHub <noreply@github.com>2017-06-12 09:28:16 -0700
commit7d9d065d3b268cd7710a06c2f5ee681cf95ea9a6 (patch)
tree57b93e6f0a490f92ea93297ba8cebfa416da125c
parenta0356ac0bc82db6b106cebcdca8739c94e908312 (diff)
parent4f9701ff91cc8382aee138d825b847d3d7dbed9f (diff)
downloadchef-7d9d065d3b268cd7710a06c2f5ee681cf95ea9a6.tar.gz
Merge pull request #6207 from MsysTechnologiesllc/piyush/fix_chomp_error
Fix chomp error for nil class
-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