diff options
author | Tim Smith <tsmith@chef.io> | 2018-06-12 13:30:20 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-06-12 13:30:20 -0700 |
commit | 563951452718a684e5921762febf0c714af9b8cd (patch) | |
tree | 63d3cb3422678c92e29f4059fd86a307cdc5913f /lib/chef/provider/package/windows.rb | |
parent | a06ed250ed0fa17302319e166388e8ad251e3808 (diff) | |
download | chef-563951452718a684e5921762febf0c714af9b8cd.tar.gz |
package: Make sure to use the package_name name propertiesname_properties
I noticed we weren't using the package_name name property in most of our why-run or logging messages in various package providers. This would lead to some pretty confusing log output when using the name property.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/provider/package/windows.rb')
-rw-r--r-- | lib/chef/provider/package/windows.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/package/windows.rb b/lib/chef/provider/package/windows.rb index 05f865d4e4..d203adafe2 100644 --- a/lib/chef/provider/package/windows.rb +++ b/lib/chef/provider/package/windows.rb @@ -37,13 +37,13 @@ class Chef def define_resource_requirements requirements.assert(:install) do |a| a.assertion { new_resource.source || msi? } - a.failure_message Chef::Exceptions::NoWindowsPackageSource, "Source for package #{new_resource.name} must be specified in the resource's source property for package to be installed because the package_name property is used to test for the package installation state for this package type." + a.failure_message Chef::Exceptions::NoWindowsPackageSource, "Source for package #{new_resource.package_name} must be specified in the resource's source property for package to be installed because the package_name property is used to test for the package installation state for this package type." end unless uri_scheme?(new_resource.source) requirements.assert(:install) do |a| a.assertion { ::File.exist?(new_resource.source) } - a.failure_message Chef::Exceptions::Package, "Source for package #{new_resource.name} does not exist" + a.failure_message Chef::Exceptions::Package, "Source for package #{new_resource.package_name} does not exist" a.whyrun "Assuming source file #{new_resource.source} would have been created." end end @@ -121,7 +121,7 @@ class Chef if basename == "setup.exe" :installshield else - raise Chef::Exceptions::CannotDetermineWindowsInstallerType, "Installer type for Windows Package '#{new_resource.name}' not specified and cannot be determined from file extension '#{file_extension}'" + raise Chef::Exceptions::CannotDetermineWindowsInstallerType, "Installer type for Windows Package '#{new_resource.package_name}' not specified and cannot be determined from file extension '#{file_extension}'" end end end |