diff options
author | Salim Alam <salam@chef.io> | 2015-08-13 14:25:48 -0700 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2015-08-19 11:08:17 -0700 |
commit | 6c4cd5c6d5c40baca723bf95cdbccdda59021198 (patch) | |
tree | f2d6357705440c11467b46c60eac0b4c5ddb871e /lib/chef/provider/batch.rb | |
parent | fe6676bab51390429674b0ecd4670924ffb09cc5 (diff) | |
download | chef-6c4cd5c6d5c40baca723bf95cdbccdda59021198.tar.gz |
Enable 64-bit support for Powershell and Batch scripts
Diffstat (limited to 'lib/chef/provider/batch.rb')
-rw-r--r-- | lib/chef/provider/batch.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/provider/batch.rb b/lib/chef/provider/batch.rb index b6b386e5a8..5f0134443d 100644 --- a/lib/chef/provider/batch.rb +++ b/lib/chef/provider/batch.rb @@ -28,6 +28,14 @@ class Chef 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}\"" + end + def flags @new_resource.flags.nil? ? '/c' : new_resource.flags + ' /c' end |