Skip to content
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

Open
oblivioncth opened this issue May 25, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@oblivioncth
Copy link
Owner

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

@oblivioncth oblivioncth added the bug Something isn't working label May 25, 2022
@oblivioncth
Copy link
Owner Author

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:
Enable-ExperimentalFeature PSNativeCommandErrorActionPreference

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":
$PSNativeCommandUseErrorActionPreference = $true.

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.

@oblivioncth
Copy link
Owner Author

Starting with 7.4.0 $PSNativeCommandUseErrorActionPreference = $true is the default, so currently the only remaining blocker is that the feature is still experimental and therefore cannot be activated conveniently for workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant