Step writing an error, but only registering the step to have a warning


One of our steps (powershell) sends out both an warning and error. It seems that Octopus only registered this as a warning instead of the error it actually is?

Our current Octopus Version is: 3.16.2
I have also attached a screenshot of the step that fails.

Hi Nick,

Thank you for getting in touch. In certain circumstances, you need to make sure that your script returns a non-zero exit code. Writing to the error output is not enough. See this blog post for the reasoning.

If you are still having trouble, could you export the step template you are using and send it to me? I can have a look at the template script to see why it is not failing the step.

Robert W

Hi Robert

Thanks for the link, ill try to just wrap it all in a Try… Catch… and then call “exit 9999”.
Lets see what happens then.