Skip to content

Commit

Permalink
specify json output for az version. update warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathys committed Jun 8, 2024
1 parent 8d09649 commit 8f0f4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/scripts/AksEdgeAzureSetup/AksEdgeAzureSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ New-Variable -Option Constant -ErrorAction SilentlyContinue -Name arcLocations -

function Set-CLILoginExperience
{
$currVersion = ((az version) | ConvertFrom-Json).'azure-cli'
$currVersion = ((az version -o json) | ConvertFrom-Json).'azure-cli'
if($currVersion -eq '2.61.0')
{
Write-Host "Warning: Az CLI version 2.61.0 has known issues. Default to v1 login experience." -ForegroundColor Yellow
Expand All @@ -35,7 +35,7 @@ function Set-CLILoginExperience
function Test-AzVersions {
#Function to check if the installed az versions are greater or equal to minVersions
$retval = $true
$curVersion = (az version) | ConvertFrom-Json
$curVersion = (az version -o json) | ConvertFrom-Json
if (-not $curVersion) { return $false }
foreach ($item in $cliMinVersions.Keys ) {
Write-Host " Checking $item minVersion $($cliMinVersions.$item).." -NoNewline
Expand Down

0 comments on commit 8f0f4c2

Please sign in to comment.