Deprecation: :uninstall Resource for chocolatey_package (CHEF-21)
The Chocolatey cookbook’s chocolatey_package
resource originally
contained an :uninstall
action. When
chocolatey_package was moved into
core Chef, we made :uninstall
an alias for :remove
. In Chef Infra Client
14, :uninstall
will no longer be a valid action.
The Cookstyle cop ChefDeprecations/ChocolateyPackageUninstallAction has been introduced to detect and autocorrect this deprecation.
Remediation
The :uninstall
action must be replaced with the :remove
action when
using the chocolatey_package
resource in recipes that you intend to
use with Chef Infra Client 14. For example, where you might previously have
used the following code to uninstall nginx
:
chocolatey_package 'nginx' do
action :uninstall
end
You would instead use:
chocolatey_package 'nginx' do
action :remove
end