oblivioncth / Qx

"Kix": Expands upon the functionality of the existing Qt C++ Library

Home Page:https://oblivioncth.github.io/Qx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows auto builds don't terminate when an external process fails

oblivioncth opened this issue · comments

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 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.

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.