From 478159d81c7c408b1d15f94e63f469af28b23ad0 Mon Sep 17 00:00:00 2001 From: nanxiangLiu Date: Wed, 15 Nov 2023 16:48:18 +0800 Subject: [PATCH 1/2] Fixed the issue of resolve path error in Install-AzAksCliTool --- src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 | 5 +++-- src/Aks/Aks/ChangeLog.md | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 b/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 index d5d66703e225..b850844371a2 100644 --- a/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 +++ b/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 @@ -175,11 +175,12 @@ Function Install-Kubectl { $Destination = [System.IO.Path]::Combine($env:USERPROFILE, ".azure-kubectl") } - $Destination = Resolve-Path -Path $Destination If (-not (Test-Path -Path $Destination)) { New-Item -Path $Destination -ItemType Directory } + $Destination = Resolve-Path -Path $Destination + If (($Null -Eq $Version) -or ("" -Eq $Version)) { $url = "$baseUrl/stable.txt" @@ -269,11 +270,11 @@ Function Install-Kubelogin { $Destination = [System.IO.Path]::Combine($env:USERPROFILE, ".azure-kubelogin") } - $Destination = Resolve-Path -Path $Destination If (-not (Test-Path -Path $Destination)) { New-Item -Path $Destination -ItemType Directory } + $Destination = Resolve-Path -Path $Destination If (($Null -Eq $Version) -or ("" -Eq $Version)) { $latestVersionInfo = (Invoke-WebRequest -Uri $latestReleaseUrl).Content | ConvertFrom-Json diff --git a/src/Aks/Aks/ChangeLog.md b/src/Aks/Aks/ChangeLog.md index 858f58c4a9ed..ded754b2c4d8 100644 --- a/src/Aks/Aks/ChangeLog.md +++ b/src/Aks/Aks/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release * Removed parameter `DockerBridgeCidr` from `New-AzAksCluster` +* Fixed the issue of resolve path error in `Install-AzAksCliTool` ## Version 5.5.1 * Fixed the issue of handling `nextLink` in `Set-AzAksCluster`. [#21846] From 387784be55a9bbab62bc21758fe24a3a04af9f12 Mon Sep 17 00:00:00 2001 From: NoriZC <110961157+NoriZC@users.noreply.github.com> Date: Fri, 17 Nov 2023 17:35:59 +0800 Subject: [PATCH 2/2] Update src/Aks/Aks/ChangeLog.md --- src/Aks/Aks/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Aks/Aks/ChangeLog.md b/src/Aks/Aks/ChangeLog.md index ded754b2c4d8..e56cfa1e3877 100644 --- a/src/Aks/Aks/ChangeLog.md +++ b/src/Aks/Aks/ChangeLog.md @@ -19,7 +19,7 @@ --> ## Upcoming Release * Removed parameter `DockerBridgeCidr` from `New-AzAksCluster` -* Fixed the issue of resolve path error in `Install-AzAksCliTool` +* Fixed the resolve path issue in `Install-AzAksCliTool`. [#22853] ## Version 5.5.1 * Fixed the issue of handling `nextLink` in `Set-AzAksCluster`. [#21846]