appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 64 forks source link

Update to PowerShell Core 7.4.0 in Linux build VMs #3902

Closed limdor closed 3 months ago

limdor commented 5 months ago

Linux build VMs currently have PowerShell Core 7.3.7. It would be good to update to 7.4.0 for the following reason.

PowerShell 7.3 introduced a experimental feature called PSNativeCommandErrorActionPreference that allows to make a script fail if a command returns a none 0 exit code without having to check for the return code. https://learn.microsoft.com/en-us/powershell/scripting/learn/experimental-features?view=powershell-7.4#psnativecommanderroractionpreference In 7.4 this feature is not experimental anymore.

It is not easy (I did not manage yet) to enable an experimental feature in Appveyor because it requires a shell restart. Updating to 7.4 would allow to use this feature without having to enable it.

Windows build VMs for Visual Sutdio 2019 and 2022 already have PowerShell 7.4.0, this would bring both to the same version without having to have different scripts for the different images. macOS build VMs has currently version 7.3.0, you might want to consider if possible to also update PowerShell Core to 7.4.0. I'm not sure why there is currently 3 different versions all different for Linux, Windows, and macOS.

OwenMcDonnell commented 3 months ago

https://www.appveyor.com/updates/2024/03/08/