Skip to content

Commit

Permalink
Merge branch 'hotfix/0.4.4'
Browse files Browse the repository at this point in the history
* hotfix/0.4.4:
  (GH-64) Report Error based on exit code * Fixes #64
  • Loading branch information
gep13 committed Mar 6, 2020
2 parents 7cfda39 + 932fd8e commit 097cc98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Task/Cake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ if (!(Test-Path $CakePath)) {
Throw "Could not find Cake.exe at $CakePath";
}

# Continue on error tool exit code determins result
$global:ErrorActionPreference = 'Continue'

# Start Cake
Write-Host "Executing build script...";
Invoke-VstsTool -FileName $CakePath -Arguments "`"$Script`" -target=`"$Target`" -verbosity=`"$Verbosity`" --paths_tools=`"$ToolPath`" $Arguments" -RequireExitCodeZero;
if ($LASTEXITCODE -ne 0) {
Write-VstsSetResult -Result Failed -DoNotThrow
}

0 comments on commit 097cc98

Please sign in to comment.