开发者

Psake nested build does not fail

开发者 https://www.devze.com 2023-01-09 10:06 出处:网络
I have a fairly simple Psake build script (default.ps1) that calls Invoke-Psake from within one of the tasks.Something like this:

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 {
  .开发者_JS百科..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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消