Skip to content

Commit 9cff2f8

Browse files
committed
self-hosted runners: use latest pwsh version now that arm64 MSIs are available
Starting with version 7.4.3 of PowerShell, Windows arm64 MSIs are added to the releases, so we no longer need to hardcode the preview version. Ref: https://github.com/PowerShell/PowerShell/releases/tag/v7.4.3 Signed-off-by: Dennis Ameling <[email protected]>
1 parent 7568723 commit 9cff2f8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

azure-self-hosted-runners/post-deployment-script.ps1

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ catch {
119119
# It contains a bunch of new features compared to "powershell" and is sometimes more stable as well.
120120
#
121121
# url for Github API to get the latest release of pwsh
122-
#
123-
# TODO update this to /releases/latest once 7.5.0 is out, as it adds support for arm64 MSIs
124-
[string]$PwshUrl = "https://api.github.com/repos/PowerShell/PowerShell/releases/tags/v7.5.0-preview.2"
122+
[string]$PwshUrl = "https://api.github.com/repos/PowerShell/PowerShell/releases/latest"
125123

126124
# Name of the MSI file that should be verified and downloaded
127125
[string]$PwshMsiName = "PowerShell-.*-win-arm64.msi"
@@ -238,10 +236,6 @@ $MsiArguments = "/qn /i `"$MsiPath`" ADD_PATH=1"
238236
# Install pwsh using msiexec
239237
Start-Process msiexec.exe -Wait -ArgumentList $MsiArguments
240238

241-
# TODO remove once 7.5.0 is out
242-
Write-Output "Copying pwsh-preview.cmd to pwsh.cmd as a temporary measure until 7.5.0 is out..."
243-
Copy-Item "C:\Program Files\PowerShell\7-preview\preview\pwsh-preview.cmd" "C:\Program Files\PowerShell\7-preview\preview\pwsh.cmd"
244-
245239
Write-Output "Finished installing pwsh."
246240

247241
# ======================

0 commit comments

Comments
 (0)