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 ...@@ -40,8 +40,9 @@ powershell_script 'Install Chocolatey' do
not_if { chocolatey_installed? } not_if { chocolatey_installed? }
end end
chocolatey_package 'chocolatey' do if node['chocolatey']['upgrade']
action :upgrade chocolatey_package 'chocolatey' do
version node['chocolatey']['install_vars']['chocolateyVersion'] action :upgrade
only_if { node['chocolatey']['upgrade'] } version node['chocolatey']['install_vars']['chocolateyVersion']
end
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