File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ jobs:
137137 shell : powershell
138138 run : |
139139 $ErrorActionPreference = "Stop"
140+ $ProgressPreference = "SilentlyContinue"
140141 $version = "7.4.20"
141142 $archive = Join-Path $env:RUNNER_TEMP "PowerShell-$version-win-arm64.zip"
142143 $installDir = Join-Path $env:RUNNER_TEMP "powershell-$version-arm64"
@@ -148,10 +149,19 @@ jobs:
148149 throw "PowerShell archive checksum mismatch"
149150 }
150151 Expand-Archive -Path $archive -DestinationPath $installDir
151- $installDir >> $env:GITHUB_PATH
152+ $installDir | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
152153 & "$installDir\pwsh.exe" -NoProfile -NonInteractive -Command '$PSVersionTable; [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture'
153154 if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
154155
156+ - name : Verify Windows ARM PowerShell selection
157+ if : inputs.platform == 'win' && inputs.arch == 'arm64'
158+ shell : pwsh
159+ run : |
160+ $expectedPath = Join-Path $env:RUNNER_TEMP "powershell-7.4.20-arm64\pwsh.exe"
161+ if ((Get-Command pwsh.exe).Source -ne $expectedPath -or $PSVersionTable.PSVersion -ne [version]"7.4.20") {
162+ throw "Windows ARM builds must use the pinned PowerShell runtime"
163+ }
164+
155165 # Windows installs straight from the registry. There, linking the packages
156166 # takes the time, not downloading them, so a ~700 MB package cache did not
157167 # pay for its own restore. Across recent nightlies, restore plus install
You can’t perform that action at this time.
0 commit comments