Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.22k stars 3.83k forks source link

[Az.Aks] folder name ".azure" is hardcoded. #24366

Open YanaXu opened 6 months ago

YanaXu commented 6 months ago

Description

In code piece: https://github.com/Azure/azure-powershell/blob/3318943634bab88fb39cfc7f150650f23502ddc9/src/Aks/Aks/Commands/KubeCmdletBase.cs#L120

The Azure PowerShell config folder name is hard coded to ".azure", which is not correct. On Windows, it's case-insensitive. It's ok. image But on Linux, it's case-sensitive. It's not ok. image

Issue script & Debug output

N/A

Environment data

N/A

Module versions

N/A

Error output

N/A
isra-fel commented 6 months ago

@msJinLei is there a reliable way to get the folder name of ".Azure" (or ".azure") programmatically?

msJinLei commented 6 months ago

@msJinLei is there a reliable way to get the folder name of ".Azure" (or ".azure") programmatically?

Please use AzureSession.Instance.ProfileDirectory

isra-fel commented 6 months ago

Conclusion: in PS, always use ".Azure" because on linux ".Azure", ".azure" are two directories, .Azure is used by PS, .azure is by CLI