-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows auto builds don't terminate when an external process fails #20
Comments
The feature is now available in 7.3.0 as an experimental feature. This means that in order to use it, one must execute the following and then restart Powershell: This means that every workflow job would need to have an extra step that does the above, which would be quite inconvenient, especially given that the jobs also need a step for enabling the feature on that specific "script": Probably will wait until the feature isn't experimental unless there's an easier way to enable experimental features in PS for workflows globally. Additionally, research needs to be done to see if there is a similarly easy way to set the preference itself globally. |
Starting with 7.4.0 |
Looks like it actually went mainstream with 7.4.0 so I just need to add it to the script and test that it works. Might also have to set $ErrorActionPreference to Stop |
I believe we just want:
At the top of applicable pwsh scripts, though this could still be quite a number of usages. Would be better if this can be applied once as an env. var. perhaps. |
Seems like in theory GitHub should be open to enabling this by default based on their existing default settings for pwsh and bash that prefer "fail-fast" behavior. This was addressed once before, but left alone as it was believed that pwsh 7.4 was going to have the feature enabled by default anyway; however, that ended up not being the case: Probably should make a new issue if this point is ignored for a while. |
Issue with PS. Current solution would require adding last error code check to every external process start.
Instead, waiting on feature new to have this behavior be automatic in 7.3.0
PowerShell/PowerShell-RFC#277
https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-73?view=powershell-7.2
The text was updated successfully, but these errors were encountered: