You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: