summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-08-24 13:00:20 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-08-24 13:00:20 -0700
commit6c4451ec9ddcfc6f365ac820ea32a307addaef4d (patch)
tree1e7326377fdd17f4bd0c9249280324cbd37975d5
parentaa3f1647a7bc30708378319c71c97e4f1af2c5f4 (diff)
downloadchef-6c4451ec9ddcfc6f365ac820ea32a307addaef4d.tar.gz
Fix powershell_script validation
Powershell script validation did not use same architecture as executing the script. This caused configuring the LCM to fail.
-rw-r--r--lib/chef/provider/powershell_script.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb
index 004b182769..b876b6d8ee 100644
--- a/lib/chef/provider/powershell_script.rb
+++ b/lib/chef/provider/powershell_script.rb
@@ -99,7 +99,10 @@ EOH
# Therefore, the only return value for a syntactically valid
# script is 0. If an exception is raised by shellout, this
# means a non-zero return and thus a syntactically invalid script.
- shell_out!(validation_command, {returns: [0]})
+
+ with_os_architecture(node, architecture: new_resource.architecture) do
+ shell_out!(validation_command, {returns: [0]})
+ end
end
end