From a36457dc3b58fa01e2fb3412dbd13e045d624f21 Mon Sep 17 00:00:00 2001 From: Sam Coe Date: Mon, 12 Oct 2020 17:03:50 +0200 Subject: [PATCH] Address PR comments --- images/win/scripts/Installers/Install-GitHub-CLI.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-GitHub-CLI.ps1 b/images/win/scripts/Installers/Install-GitHub-CLI.ps1 index b708508a..6e9a2e62 100644 --- a/images/win/scripts/Installers/Install-GitHub-CLI.ps1 +++ b/images/win/scripts/Installers/Install-GitHub-CLI.ps1 @@ -4,11 +4,9 @@ ################################################################################ Write-Host "Get the latest gh version..." -$GhReleasesJson = Invoke-RestMethod "https://api.github.com/repos/cli/cli/releases/latest" -$WindowsMsiAssetNamePattern = "windows_amd64.msi" -$WindowsMsiAsset = $GhReleasesJson.assets | Where-Object { $_.name.EndsWith($WindowsMsiAssetNamePattern) } | Select-Object -First 1 -$Name = $WindowsMsiAsset.name -$DownloadUrl = $WindowsMsiAsset.browser_download_url + +$Name = "gh_windows_amd64.msi" +$DownloadUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/cli/cli/releases/latest").assets.browser_download_url -match "windows_amd64.msi" Install-Binary -Url $DownloadUrl -Name $Name