summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNimesh-Msys <nimesh.patni@msystechnologies.com>2019-02-04 21:53:00 +0530
committerNimesh-Msys <nimesh.patni@msystechnologies.com>2019-02-04 21:53:00 +0530
commit4c0c28f118b022d5119c77d7fa55d2f50695138f (patch)
tree0d0011cc75c5a8519a4dd607673e176eb7210ca8 /lib
parent0f4bd34e95111d755b646d85150698626e27fa3d (diff)
downloadchef-4c0c28f118b022d5119c77d7fa55d2f50695138f.tar.gz
windows_task: Minor fix while setting command and arguments of task
Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/provider/windows_task.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb
index c656506138..ab88575510 100644
--- a/lib/chef/provider/windows_task.rb
+++ b/lib/chef/provider/windows_task.rb
@@ -116,9 +116,8 @@ class Chef
end
def action_create
- if new_resource.command && new_resource.command.split.size > 1
- set_command_and_arguments
- end
+ set_command_and_arguments if new_resource.command
+
if current_resource.exists
logger.trace "#{new_resource} task exist."
unless (task_needs_update?(current_resource.task)) || (new_resource.force)