Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail the build when the user's script fails #351

Closed
wants to merge 1 commit into from

Conversation

robrich
Copy link

@robrich robrich commented Jul 28, 2015

No description provided.

@msftclas
Copy link

Hi @robrich, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@@ -20,5 +20,8 @@ Write-Host "ScriptPath= $ScriptPath"
$scriptCommand = "& `"$ScriptPath`" $scriptArguments"
Write-Host "scriptCommand= $scriptCommand"
Invoke-Expression -Command $scriptCommand
if ($LASTEXITCODE -ne 0) {
Write-Error -Message "##[error]BUILD FAILED: $LASTEXITCODE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need the ##[error] here we have overridden the Write-Error so it should take care of the formatting for you for the log highlighting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Should we even include "BUILD FAILED"?

@bryanmacfarlane
Copy link
Contributor

Muthu, can you work with Eric. This has been rewritten and we just can't take it like it is. It will break previous behavior. We have to add an input to influence behavior and the default would be the previous behavior.

I believe this is irrelevant since it has been rewritten since.

@mvvsubbu
Copy link
Member

Closing this PR as this change is no more relevant

@mvvsubbu mvvsubbu closed this Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants