Open tig opened 1 year ago
I would like to bring attention to a related issue with using newer PowerShell versions and that is configuring breaking features. One new default enabled feature as of 7.3 is PSNativeCommandArgumentPassing
.
It can be enabled on 7.2 by changing the config, but changing the config requires a restart of powershell. It would be fantastic if this could be solved by the runner, if a feature is demanded to be enabled we update the powershell config, and then start pwsh.
That would make it easier to migrate to newer versions of powershell when 7.4 LTS eventually lands in actions/runner-images.
What I described here is to workaround not having a flexible way of enabling/disabling experimental features in powershell directly.
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.
It should be easier to force
shell: pwsh
to use a specific pwsh installation; it seems to always useC:\Program Files\PowerShell\7\pwsh.EXE
. I triedshell: C:\Users\runneradmin\.dotnet\tools\pwsh
and got an error.I've found a workaround of having a step install the latest PS using
dotnet tool install
and changing$env:GITHUB_PATH
, but it's clunky.This (or something similar) should work:
shell: $HOME + /.dotnet/tools/pwsh {0}
Originally posted by @tig in https://github.com/actions/runner-images/issues/8754#issuecomment-1796170450