# File lib/chef/provider/windows_script.rb, line 30 def initialize( new_resource, run_context, script_extension='') super( new_resource, run_context ) @script_extension = script_extension target_architecture = new_resource.architecture.nil? ? node_windows_architecture(run_context.node) : new_resource.architecture @is_wow64 = wow64_architecture_override_required?(run_context.node, target_architecture) # if the user wants to run the script 32 bit && we are on a 64bit windows system && we are running a 64bit ruby ==> fail if ( target_architecture == :i386 ) && node_windows_architecture(run_context.node) == :x86_64 && !is_i386_process_on_x86_64_windows? raise Chef::Exceptions::Win32ArchitectureIncorrect, "Support for the i386 architecture from a 64-bit Ruby runtime is not yet implemented" end end
# File lib/chef/provider/windows_script.rb, line 48 def action_run wow64_redirection_state = nil if @is_wow64 wow64_redirection_state = disable_wow64_file_redirection(@run_context.node) end begin super rescue raise ensure if ! wow64_redirection_state.nil? restore_wow64_file_redirection(@run_context.node, wow64_redirection_state) end end end
Generated with the Darkfish Rdoc Generator 2.