Check az login for target subscription in stress deploy login (#5054)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2023-10-24 13:23:34 -07:00 committed by GitHub
parent ccddc7f3ed
commit 5174503dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ function RunOrExitOnFailure()
function Login([string]$subscription, [string]$clusterGroup, [switch]$skipPushImages)
{
Write-Host "Logging in to subscription, cluster and container registry"
az account show *> $null
az account show -s "$subscription" *> $null
if ($LASTEXITCODE) {
RunOrExitOnFailure az login --allow-no-subscriptions
}