Method: Chef::Provider::Package::Windows::Exe#remove_package

Defined in:
lib/chef/provider/package/windows/exe.rb

#remove_packageObject



71
72
73
74
75
76
77
78
# File 'lib/chef/provider/package/windows/exe.rb', line 71

def remove_package
  uninstall_version = new_resource.version || current_installed_version
  uninstall_entries.select { |entry| [uninstall_version].flatten.include?(entry.display_version) }
    .map(&:uninstall_string).uniq.each do |uninstall_string|
      logger.trace("Registry provided uninstall string for #{new_resource} is '#{uninstall_string}'")
      shell_out!(uninstall_command(uninstall_string), default_env: false, timeout: new_resource.timeout, returns: new_resource.returns)
    end
end