summaryrefslogtreecommitdiff
path: root/lib/chef/provider/batch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/batch.rb')
-rw-r--r--lib/chef/provider/batch.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/chef/provider/batch.rb b/lib/chef/provider/batch.rb
index b79b464cbd..af52b0a36a 100644
--- a/lib/chef/provider/batch.rb
+++ b/lib/chef/provider/batch.rb
@@ -24,22 +24,15 @@ class Chef
provides :batch
- def initialize(new_resource, run_context)
- super(new_resource, run_context, ".bat")
- end
-
def command
- basepath = is_forced_32bit ? wow64_directory : run_context.node["kernel"]["os_info"]["system_directory"]
-
interpreter_path = Chef::Util::PathHelper.join(basepath, interpreter)
- "\"#{interpreter_path}\" #{flags} \"#{script_file.path}\""
+ "\"#{interpreter_path}\" #{new_resource.flags} /c \"#{script_file_path}\""
end
- def flags
- new_resource.flags.nil? ? "/c" : new_resource.flags + " /c"
+ def script_extension
+ ".bat"
end
-
end
end
end