While I get your reasoning using $LastExitCode doesn't quite cover detecting errors in PowerShell. $LastExitCode will only be set after an executable has been run, it not set when a cmdlet fails (and might be unset when no executable was started in the script). On top of that the script might start multiple executables and this only fails the build when the last of those fails. Perhaps checking $errors could be useful, but error handling in PowerShell is a bit painful anyway.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to