Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Commit

Permalink
(GH-256) cpack/cpush always return 0 exit code even w/errors
Browse files Browse the repository at this point in the history
 - This fixes the process to return the non-zero exit code when errors occur
  • Loading branch information
ferventcoder committed Jul 11, 2014
1 parent a3213ac commit 3ff8ba0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/functions/Chocolatey-Pack.ps1
Expand Up @@ -18,8 +18,7 @@ param(
Write-Host $line
}
$errors = Get-Content $errorLogFile
if ($errors -ne '') {
Write-Host $errors -BackgroundColor Red -ForegroundColor White
#throw $errors
if ($process.ExitCode -ne 0) {
throw $errors
}
}
5 changes: 2 additions & 3 deletions src/functions/Chocolatey-Push.ps1
Expand Up @@ -25,8 +25,7 @@ param(
Write-Host $line -ForegroundColor $Note -BackgroundColor Black
}
$errors = Get-Content $errorLogFile
if ($errors -ne '') {
Write-Host $errors -BackgroundColor Red -ForegroundColor White
#throw $errors
if ($process.ExitCode -ne 0) {
throw $errors
}
}

0 comments on commit 3ff8ba0

Please sign in to comment.