@@ -23,9 +23,7 @@ Download and install kubectl and kubelogin.
23
23
function Install-AzAksCliTool
24
24
{
25
25
[OutputType ([System.Boolean ])]
26
- [Alias (" Install-AzAksKubectl" )]
27
26
[CmdletBinding (PositionalBinding = $false , SupportsShouldProcess , ConfirmImpact = ' Medium' )]
28
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.CmdletBreakingChangeAttribute (" 9.0.0" , " 2022/10/12" , ReplacementCmdletName = ' Install-AzAksCliTool' )]
29
27
param (
30
28
[Alias (" KubectlInstallDestination" )]
31
29
[Parameter ()]
@@ -155,11 +153,11 @@ Function Install-Kubectl
155
153
{
156
154
$Destination = [System.IO.Path ]::Combine($env: USERPROFILE , " .azure-kubectl" )
157
155
}
156
+ $Destination = Resolve-Path - Path $Destination
158
157
If (-not (Test-Path - Path $Destination ))
159
158
{
160
159
New-Item - Path $Destination - ItemType Directory
161
160
}
162
- $Destination = Resolve-Path - Path $Destination
163
161
If (($Null -Eq $Version ) -or (" " -Eq $Version ))
164
162
{
165
163
$url = " $baseUrl /stable.txt"
@@ -249,11 +247,11 @@ Function Install-Kubelogin
249
247
{
250
248
$Destination = [System.IO.Path ]::Combine($env: USERPROFILE , " .azure-kubelogin" )
251
249
}
250
+ $Destination = Resolve-Path - Path $Destination
252
251
If (-not (Test-Path - Path $Destination ))
253
252
{
254
253
New-Item - Path $Destination - ItemType Directory
255
254
}
256
- $Destination = Resolve-Path - Path $Destination
257
255
If (($Null -Eq $Version ) -or (" " -Eq $Version ))
258
256
{
259
257
$latestVersionInfo = (Invoke-WebRequest - Uri $latestReleaseUrl ).Content | ConvertFrom-Json
0 commit comments