views:

30

answers:

1

I have a fairly simple Psake build script (default.ps1) that calls Invoke-Psake from within one of the tasks. Something like this:

(default.ps1)

. .\utilities.ps1
properties {
  ...define some properties
}

task default -depends Step1

task Step1 {
    Invoke-Psake script2.ps1
}

The second build script has a task and does its thing.

(script2.ps1)

. .\utilities.ps1
properties {
    ...define properties
}

task default -depends script2.CreateSchema

task script2.CreateSchema {
    Invoke-Sqlcmd ....(parameters)
}

The tasks work fine; the Invoke-Sqlcmd call works.

The problem I'm facing is if for some reason the script2.CreateSchema task fails Psake still reports that the build succeeds. The task failure in the child script is not bubbling up to the parent script such that Psake fails the build.

Anyone run into this? Is this maybe a problem with the new nested build feature of Psake?

Psake v4.0
Powershell v2.0

+1  A: 

This is apparently a problem in Psake as confirmed by the feature author. I cross-posted on the Psake Users Google group.

squillman