0

When putting together a release definition in VSO, adding an Azure PowerShell task backed by a file Script1.ps only containing exit 1 does not fail the step when it runs - which I would expect it to do, given that the Continue on error box is not checked If I add the PowerShell task, writing exit 1 using the inline variant would indeed fail the step. This also comes with an 'advanced configuration option' where the Fail on Standard Error is checked by default.

What did I miss? How would I go about making the Azure Powershell fail in the same manner?

2 Answers 2

3

Using this code instead:

[Environment]::Exit(1)
Sign up to request clarification or add additional context in comments.

Comments

0

The task will fail if the script throws an exception or writes to stderr stream.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.