diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-08-24 13:00:20 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-08-24 13:00:20 -0700 |
commit | 6c4451ec9ddcfc6f365ac820ea32a307addaef4d (patch) | |
tree | 1e7326377fdd17f4bd0c9249280324cbd37975d5 | |
parent | aa3f1647a7bc30708378319c71c97e4f1af2c5f4 (diff) | |
download | chef-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.rb | 5 |
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 |