diff options
Diffstat (limited to 'lib/chef/resource/windows_script.rb')
-rw-r--r-- | lib/chef/resource/windows_script.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_script.rb b/lib/chef/resource/windows_script.rb index 48e2b535a8..2bbd01d5aa 100644 --- a/lib/chef/resource/windows_script.rb +++ b/lib/chef/resource/windows_script.rb @@ -16,6 +16,7 @@ # limitations under the License. # +require 'chef/platform/query_helpers' require 'chef/resource/script' require 'chef/mixin/windows_architecture_helper' @@ -51,9 +52,12 @@ class Chef protected def assert_architecture_compatible!(desired_architecture) - if ! node_supports_windows_architecture?(node, desired_architecture) + if desired_architecture == :i386 && Chef::Platform.windows_nano_server? raise Chef::Exceptions::Win32ArchitectureIncorrect, - "cannot execute script with requested architecture '#{desired_architecture.to_s}' on a system with architecture '#{node_windows_architecture(node)}'" + "cannot execute script with requested architecture 'i386' on Windows Nano Server" + elsif ! node_supports_windows_architecture?(node, desired_architecture) + raise Chef::Exceptions::Win32ArchitectureIncorrect, + "cannot execute script with requested architecture '#{desired_architecture.to_s}' on a system with architecture '#{node_windows_architecture(node)}'" end end end |