diff options
author | Tim Smith <tsmith@chef.io> | 2018-07-23 09:19:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 09:19:59 -0700 |
commit | 6b66a43ff779f95b73543a5b9a68b950408083b6 (patch) | |
tree | e5817d2898fd95a68ecd36953aa53f488f2b9ff2 /lib/chef/provider | |
parent | 83fef3b411ba66134287d1cbd6a56df2179d3512 (diff) | |
parent | 4b5f73868ea131780ac29c3b8d6dfb7506b02afa (diff) | |
download | chef-6b66a43ff779f95b73543a5b9a68b950408083b6.tar.gz |
Merge pull request #7497 from MsysTechnologiesllc/nimesh/MSYS-855_fixing_windows_task_quotes
Handling Quotes in Windows Task Commands and Arguments
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/windows_task.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index 4fb4817020..b1c59ec41c 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -21,6 +21,7 @@ require "rexml/document" require "iso8601" require "chef/mixin/powershell_out" require "chef/provider" +require "chef/util/path_helper" require "win32/taskscheduler" if Chef::Platform.windows? class Chef @@ -229,8 +230,7 @@ class Chef # seprated command arguments from :command property def set_command_and_arguments - new_resource.command = new_resource.command.gsub(/\\/, '\&\&') - cmd, *args = Shellwords.split(new_resource.command) + cmd, *args = Chef::Util::PathHelper.split_args(new_resource.command) new_resource.command = cmd new_resource.command_arguments = args.join(" ") end |