Commit dc812b58 authored by Tim Smith's avatar Tim Smith
Browse files

Avoid no-op resource logs if upgrade isn't set



Let's not log a chocolatey resource if upgrade wasn't set
Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent c50579ca
......@@ -40,8 +40,9 @@ powershell_script 'Install Chocolatey' do
not_if { chocolatey_installed? }
end
chocolatey_package 'chocolatey' do
action :upgrade
version node['chocolatey']['install_vars']['chocolateyVersion']
only_if { node['chocolatey']['upgrade'] }
if node['chocolatey']['upgrade']
chocolatey_package 'chocolatey' do
action :upgrade
version node['chocolatey']['install_vars']['chocolateyVersion']
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment