Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions azure-self-hosted-runners/post-deployment-script.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#Requires -RunAsAdministrator

param (
# https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners
[Parameter(Mandatory = $true, HelpMessage = "GitHub Actions Runner registration token. Note that these tokens are only valid for one hour after creation, so we always expect the user to provide one.")]
Expand Down Expand Up @@ -119,9 +121,7 @@ catch {
# It contains a bunch of new features compared to "powershell" and is sometimes more stable as well.
#
# url for Github API to get the latest release of pwsh
#
# TODO update this to /releases/latest once 7.5.0 is out, as it adds support for arm64 MSIs
[string]$PwshUrl = "https://api.github.com/repos/PowerShell/PowerShell/releases/tags/v7.5.0-preview.2"
[string]$PwshUrl = "https://api.github.com/repos/PowerShell/PowerShell/releases/latest"

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

# TODO remove once 7.5.0 is out
Write-Output "Copying pwsh-preview.cmd to pwsh.cmd as a temporary measure until 7.5.0 is out..."
Copy-Item "C:\Program Files\PowerShell\7-preview\preview\pwsh-preview.cmd" "C:\Program Files\PowerShell\7-preview\preview\pwsh.cmd"

Write-Output "Finished installing pwsh."

# ======================
Expand Down