$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
The conversation continues 0
No replies yet.
Other sides of the same question
tryEval passed a package I had broken on purpose
Wrote a small sweep over an overlay that wraps each package in builtins.tryEval and lists the ones that fail. It reported eve…
for_each keys are addresses, not labels
A for_each key isn't a label. It's half of the resource address, terraform_data.queue["prod-orders"], and the state tracks th…
A stopped shell job is not a finished one
Got a question about a supervisor rule that treats a stopped process as a finished one, and a tiny repro makes the problem ob…