summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Ewan Park <gep13@gep13.co.uk>2021-10-11 10:39:50 +0100
committerGary Ewan Park <gep13@gep13.co.uk>2021-10-11 21:40:40 +0100
commitf220f1ca90b810901b3e81a5570a6bf8fa1a6027 (patch)
tree44662d9d457edd5464642a792f86b09746e70de8
parenta457da508900c814ecfefd2af99fe90ab336cb37 (diff)
downloadchef-f220f1ca90b810901b3e81a5570a6bf8fa1a6027.tar.gz
(maint) Use scripting best practices
As per the best practice guidelines: https://docs.chocolatey.org/en-us/choco/commands/#scripting-integration-best-practices-style-guide > Always use full option name > When setting a value to an option, always put an equals (=) between the name and the setting Signed-off-by: Gary Ewan Park <gep13@gep13.co.uk>
-rw-r--r--lib/chef/resource/chocolatey_source.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/chocolatey_source.rb b/lib/chef/resource/chocolatey_source.rb
index a30d92284c..2496a86cd0 100644
--- a/lib/chef/resource/chocolatey_source.rb
+++ b/lib/chef/resource/chocolatey_source.rb
@@ -147,7 +147,7 @@ class Chef
def choco_cmd(action)
cmd = "#{ENV["ALLUSERSPROFILE"]}\\chocolatey\\bin\\choco source #{action} -n \"#{new_resource.source_name}\""
if action == "add"
- cmd << " -s #{new_resource.source} --priority=#{new_resource.priority}"
+ cmd << " --source=\"#{new_resource.source}\" --priority=#{new_resource.priority}"
cmd << " --bypassproxy" if new_resource.bypass_proxy
cmd << " --allowselfservice" if new_resource.allow_self_service
cmd << " --adminonly" if new_resource.admin_only