diff options
Diffstat (limited to 'lib/chef/provider/package/chocolatey.rb')
-rw-r--r-- | lib/chef/provider/package/chocolatey.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb index a7e6096cd6..98cb57cb79 100644 --- a/lib/chef/provider/package/chocolatey.rb +++ b/lib/chef/provider/package/chocolatey.rb @@ -154,6 +154,7 @@ class Chef # run before choco.exe gets called from #load_current_resource. exe_path = ::File.join(choco_install_path.to_s, "bin", "choco.exe") raise Chef::Exceptions::MissingLibrary, CHOCO_MISSING_MSG unless ::File.exist?(exe_path) + exe_path end end @@ -230,6 +231,7 @@ class Chef # @return [Hash] name-to-version mapping of available packages def available_packages return @available_packages if @available_packages + @available_packages = {} package_name_array.each do |pkg| available_versions = @@ -266,6 +268,7 @@ class Chef hash = {} choco_command(*args).stdout.each_line do |line| next if line.start_with?("Chocolatey v") + name, version = line.split("|") hash[name.downcase] = version&.chomp end |