summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/windows_architecture_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/windows_architecture_helper.rb')
-rw-r--r--lib/chef/mixin/windows_architecture_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/mixin/windows_architecture_helper.rb b/lib/chef/mixin/windows_architecture_helper.rb
index a0ac34f627..c5f3e1bd79 100644
--- a/lib/chef/mixin/windows_architecture_helper.rb
+++ b/lib/chef/mixin/windows_architecture_helper.rb
@@ -42,7 +42,7 @@ class Chef
is_i386_process_on_x86_64_windows?
end
- def with_os_architecture(node)
+ def with_os_architecture(node, architecture: nil)
node ||= begin
os_arch = ENV['PROCESSOR_ARCHITEW6432'] ||
ENV['PROCESSOR_ARCHITECTURE']
@@ -51,9 +51,12 @@ class Chef
n[:kernel][:machine] = os_arch == 'AMD64' ? :x86_64 : :i386
end
end
+
+ architecture ||= node_windows_architecture(node)
+
wow64_redirection_state = nil
- if wow64_architecture_override_required?(node, node_windows_architecture(node))
+ if wow64_architecture_override_required?(node, architecture)
wow64_redirection_state = disable_wow64_file_redirection(node)
end