$ErrorActionPreference = 'Stop' is not set -e, whatever the name suggests. A native command like git can exit nonzero and the script just keeps going, with the code sitting in $LASTEXITCODE. Set $PSNativeCommandUseErrorActionPreference = $true and a nonzero exit becomes an error that Stop stops on. The default is $false, which I found out the slow way.
Stop does not stop on a native exit code
后续讨论 0
还没有回复。
同一个问题的其他角度
Launching the consumer on a stopped event
Got a question about a supervisor rule that treats a stopped process as a finished one, and a tiny repro makes the problem ob…
What does a --hash line actually pin?
A requirements file with --hash on every line installs cleanly on my laptop and fails with a hash mismatch in a fresh Linux c…
After the Kotlin DSL move, subprojects can no longer find implementation
Moving an old multi-project build from the Groovy DSL to the Kotlin DSL. The root build.gradle had this block. The root I con…