Search code examples
windowswindows-installerchef-infrachef-recipecookbook

windows_package resource is demanding the source parameter


According to the chef doc the source param is optional and:

...If the source property is not specified, the package name MUST be exactly the same as the display name...

I confirmed the package is correct (including case) in add remove programs and the registry and did this in my recipe:

windows_package 'My Package Name' do
  action :remove
end

Yet it throws this error:

    ================================================================================
Error executing action `remove` on resource 'windows_package[My Package Name]'
           ================================================================================

Chef::Exceptions::ValidationFailed
----------------------------------
source is required

Source is required? No its not! Is the documentation wrong or am I just being dumb?


Solution

  • Known issue, you can follow it at https://github.com/chef/chef/issues/5274.