Use pwsh instead of powershell

https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defaultsrunshell

> This is the default shell used on Windows. The PowerShell Core. GitHub
  appends the extension .ps1 to your script name. If your self-hosted
  Windows runner does not have PowerShell Core installed, then
  PowerShell Desktop is used instead.

Fixes #1653
This commit is contained in:
Taiki Endo
2026-04-02 09:28:57 +09:00
parent 8ae92145e3
commit 01b93a891a
2 changed files with 3 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
- Fix a regression that caused an execution policy violation on self-hosted Windows runner due to use of non-default `powershell` shell, introduced in 2.71.0.
- Update `dprint@latest` to 0.53.2.
## [2.71.0] - 2026-04-01

View File

@@ -58,7 +58,7 @@ runs:
Set-StrictMode -Version Latest
$action_path = $env:GITHUB_ACTION_PATH
& bash --noprofile --norc "${action_path}/main.sh"
shell: powershell
shell: pwsh
env:
# NB: Sync with non-Windows case.
INPUT_TOOL: ${{ inputs.tool }}