Skip to content

Commit

Permalink
Merge pull request psake#91 from vorou/master
Browse files Browse the repository at this point in the history
Exec actually checks return code
  • Loading branch information
damianh committed Dec 23, 2013
2 parents df1fb43 + 690a9c2 commit 9628f28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion psake.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function Exec

do {
try {
$lastexitcode = 0
$global:lastexitcode = 0
& $cmd
if ($lastexitcode -ne 0) {
throw ("Exec: " + $errorMessage)
Expand Down
13 changes: 5 additions & 8 deletions specs/running_aspnet_compiler_under_dotNet35_should_pass.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ $framework = '3.5'
task default -depends AspNetCompiler

task AspNetCompiler {
try {
aspnet_compiler
aspnet_compiler
if ($LastExitCode -ne 1) {
throw 'Error: Could not execute aspnet_compiler'
}
catch [Exception]{
if ($LastExitCode -ne 1) {
throw 'Error: Could not execute aspnet_compiler'
}
}
}
$global:LastExitCode = 0
}

0 comments on commit 9628f28

Please sign in to comment.