Skip to content

Commit 06171f4

Browse files
NickcandyNoriZC
andauthored
Fixed the issue of resolve path error in Install-AzAksCliTool (#23443)
* Fixed the issue of resolve path error in Install-AzAksCliTool * Update src/Aks/Aks/ChangeLog.md --------- Co-authored-by: NoriZC <[email protected]>
1 parent 58ef510 commit 06171f4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,12 @@ Function Install-Kubectl
175175
{
176176
$Destination = [System.IO.Path]::Combine($env:USERPROFILE, ".azure-kubectl")
177177
}
178-
$Destination = Resolve-Path -Path $Destination
179178
If (-not (Test-Path -Path $Destination))
180179
{
181180
New-Item -Path $Destination -ItemType Directory
182181
}
182+
$Destination = Resolve-Path -Path $Destination
183+
183184
If (($Null -Eq $Version) -or ("" -Eq $Version))
184185
{
185186
$url = "$baseUrl/stable.txt"
@@ -269,11 +270,11 @@ Function Install-Kubelogin
269270
{
270271
$Destination = [System.IO.Path]::Combine($env:USERPROFILE, ".azure-kubelogin")
271272
}
272-
$Destination = Resolve-Path -Path $Destination
273273
If (-not (Test-Path -Path $Destination))
274274
{
275275
New-Item -Path $Destination -ItemType Directory
276276
}
277+
$Destination = Resolve-Path -Path $Destination
277278
If (($Null -Eq $Version) -or ("" -Eq $Version))
278279
{
279280
$latestVersionInfo = (Invoke-WebRequest -Uri $latestReleaseUrl).Content | ConvertFrom-Json

src/Aks/Aks/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
## Version 6.0.0
2323
* Removed parameter `DockerBridgeCidr` from `New-AzAksCluster`
24+
* Fixed the resolve path issue in `Install-AzAksCliTool`. [#22853]
2425

2526
## Version 5.5.1
2627
* Fixed the issue of handling `nextLink` in `Set-AzAksCluster`. [#21846]

0 commit comments

Comments
 (0)