PowerShell task fails if there is any output to standard error (Bug #269)


Added by Aaron Jensen over 4 years ago. Updated over 3 years ago.


Status:Feedback Start date:03/13/2013
Priority:Normal Due date:
Assignee:Ruben Willems % Done:

0%

Category:- Spent time: -
Target version:1.9
Affected version:1.8.3

Description

The PowerShell task causes a build to fail if there is any output to standard error. Please update the PowerShell task to not do this. Just because an error occurs doesn't mean a build should fail. The executable task only uses exit codes to determine if a process fails. I think the PowerShell should do the same.


PowerShellTask.cs (16.9 kB) Aaron Jensen, 03/13/2013 12:38 am

PowerShellTaskTest.cs (13.8 kB) Aaron Jensen, 03/13/2013 12:38 am


History

Updated by Aaron Jensen over 4 years ago

Here are the changes to the 1.8.3 codebase for this change.

Updated by Aaron Jensen over 4 years ago

To be a little clearer, I believe this is a breaking change than earlier versions of CCNet (1.6, specifically). We have a lot of builds that run tests in PowerShell. Some of those tests write errors out, but it doesn't mean the tests fail, just that the code being tested is writing an error. With 1.8.3, these test builds fail even though there are no failing tests. Would it be possible to create a configuration option on the PowerShell task that will fail the build if anything any errors are written, something like:

<failIfErrors>true</failIfErrors>

The default value would be false, to preserve behavior with 1.6.

Updated by Ruben Willems almost 4 years ago

  • Target version set to 1.8.5

Updated by Ruben Willems almost 4 years ago

that change (breaking the build) was done for issue fixing #42

Adding a configuration option is an idea to keep each scenario :
AlsoFailWhenErrorsWrittenToErrorOutput

anyone got a better name?

  • Status changed from New to Feedback
  • Assignee set to Ruben Willems

Updated by Olivier Sannier almost 4 years ago

Name suggestion:

FailOnErrorOutput

Updated by Ruben Willems over 3 years ago

  • Target version changed from 1.8.5 to 1.9

Also available in: Atom PDF