-
Notifications
You must be signed in to change notification settings - Fork 76
Description
I was hoping to use the node['chocolatey']['upgrade'] attribute to keep the underlying chocolatey version up to date, but it doesn't seem to work. I think this is due to how the LWRP behaves if the version field is left blank as it is in the chocolatey "chocolatey" resource at the end of the default recipe.
Looking at the code in providers/default.rb, which runs in response to that resource, "package_installed?" will be true as obviously chocolatey is already installed (by the install.ps1 boot-strapper). We don't specify a particular version, so "package_exists?" also returns true. Unfortunately "upgradeable?" takes the latter as gospel so assumes there's nothing to do.
Would you accept a PR to only use @current_resource.exists if the version is not blank?