2024-07-15 23:18:52 -07:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
param([string]$SasToken)
|
|
|
|
|
|
|
|
if (Test-Path "$PSScriptRoot/utility-prefix.ps1") {
|
|
|
|
. "$PSScriptRoot/utility-prefix.ps1"
|
|
|
|
}
|
|
|
|
|
|
|
|
[string]$AzCliUrl
|
|
|
|
if ([string]::IsNullOrEmpty($SasToken)) {
|
2024-11-19 14:42:29 -08:00
|
|
|
Write-Host 'Downloading from the Internet'
|
2024-12-21 03:48:36 -08:00
|
|
|
$AzCliUrl = 'https://azcliprod.blob.core.windows.net/msi/azure-cli-2.67.0-x64.msi'
|
2024-07-15 23:18:52 -07:00
|
|
|
} else {
|
2024-11-19 14:42:29 -08:00
|
|
|
Write-Host 'Downloading from vcpkgimageminting using SAS token'
|
2024-07-15 23:18:52 -07:00
|
|
|
$SasToken = $SasToken.Replace('"', '')
|
2024-12-21 03:48:36 -08:00
|
|
|
$AzCliUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/azure-cli-2.67.0-x64.msi?$SasToken"
|
2024-07-15 23:18:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
DownloadAndInstall -Url $AzCliUrl -Name 'Azure CLI' -Args @('/quiet', '/norestart')
|