Powershell 执行psake任务时退出代码-1

Powershell 执行psake任务时退出代码-1,powershell,build-script,psake,Powershell,Build Script,Psake,我有一个从构建脚本运行的psake任务,以验证预期工件是否在预期位置创建。当我从命令行运行它时,它似乎可以工作,但是当断言通过或失败时,它返回一个错误代码-1。退出代码-1是什么意思?当它通过断言时,为什么我得不到0的退出代码 task VerifyArtifacts { Assert (Test-Path $package_file) "$package_file could not be found" } 要执行的命令: psake .\default.ps1 VerifyArti

我有一个从构建脚本运行的psake任务,以验证预期工件是否在预期位置创建。当我从命令行运行它时,它似乎可以工作,但是当断言通过或失败时,它返回一个错误代码-1。退出代码-1是什么意思?当它通过断言时,为什么我得不到0的退出代码

task VerifyArtifacts {
    Assert (Test-Path $package_file) "$package_file could not be found"
}
要执行的命令:

psake .\default.ps1 VerifyArtifacts