Skip to content

Commit 0faaaad

Browse files
authored
Fixed the resolve path issue in Install-AzAksCliTool. [#22853] (#24032)
1 parent 6934dc8 commit 0faaaad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-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

0 commit comments

Comments
 (0)