summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Pop <al3xpop@gmail.com>2015-06-25 13:21:26 -0700
committerAlex Pop <al3xpop@gmail.com>2015-06-25 13:21:26 -0700
commitbda99308105d6b1c0b384cb0975131f1218efc07 (patch)
tree17ad6688d6c693e531b7896f61cd4d14d4795bfb
parentcf3bbb0dcd78dde44394cf0dda70d7ceef097b9b (diff)
downloadchef-alexpop/powershell_script_stdout.tar.gz
print STDOUT from the powershell wrapper. fixes issue #3596alexpop/powershell_script_stdout
-rw-r--r--lib/chef/provider/powershell_script.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb
index ed44dee6ae..3715f33331 100644
--- a/lib/chef/provider/powershell_script.rb
+++ b/lib/chef/provider/powershell_script.rb
@@ -163,6 +163,9 @@ elseif ( $LASTEXITCODE -ne $null -and $LASTEXITCODE -ne 0 )
$exitstatus = $LASTEXITCODE
}
+# Print STDOUT for the script execution
+Write-Output $chefscriptresult
+
# If this script is launched with -File, the process exit
# status of PowerShell.exe will be $exitstatus. If it was
# launched with -Command, it will be 0 if $exitstatus was 0,