diff options
author | Kapil Chouhan <kapil.chouhan@msystechnologies.com> | 2020-04-02 11:42:04 +0000 |
---|---|---|
committer | Kapil Chouhan <kapil.chouhan@msystechnologies.com> | 2020-04-23 09:57:59 +0000 |
commit | beb3610ed88189708c1318ce5d0904ca18026562 (patch) | |
tree | 3adbc61124ba2b69453a916558396b238ad88e6b /lib/chef/provider/package/chocolatey.rb | |
parent | 16b6db24f54f4fa015b4939880a04abb9a8c256b (diff) | |
download | chef-beb3610ed88189708c1318ce5d0904ca18026562.tar.gz |
Fix for Chocolate_resource options causing extra quotesKapil/Github-9413_Chocolate_resource_options_causing_extra_quotes
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Diffstat (limited to 'lib/chef/provider/package/chocolatey.rb')
-rw-r--r-- | lib/chef/provider/package/chocolatey.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb index f1f7dac8ce..f1f2307f5b 100644 --- a/lib/chef/provider/package/chocolatey.rb +++ b/lib/chef/provider/package/chocolatey.rb @@ -17,14 +17,15 @@ require_relative "../package" require_relative "../../resource/chocolatey_package" +require_relative "../../win32/api/command_line_helper" if ChefUtils.windows? class Chef class Provider class Package class Chocolatey < Chef::Provider::Package + include Chef::ReservedNames::Win32::API::CommandLineHelper if ChefUtils.windows? provides :chocolatey_package - # Declare that our arguments should be arrays use_multipackage_api @@ -207,7 +208,7 @@ class Chef # @param include_source [Boolean] should the source parameter be added # @return [String] options from new_resource or empty string def cmd_args(include_source: true) - cmd_args = [ new_resource.options ] + cmd_args = new_resource.options.is_a?(String) ? command_line_to_argv_w_helper(new_resource.options) : Array(new_resource.options) cmd_args += common_options(include_source: include_source) cmd_args end |