This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.63k
stars
2.84k
forks
source link
[Identity] Use full path for CLI executables #38606
Since shutil.which is always run to verify the existence of the az and azd executables, and it gives the full path of the executable, let's just call the executable path directly for AzureCliCredential and AzureDeveloperCliCredential.
Also, adjustments were made to pass in subprocess arguments as a list which is the preferred way of passing commands/arguments to subprocesses instead of going through the shell.
Since
shutil.which
is always run to verify the existence of theaz
andazd
executables, and it gives the full path of the executable, let's just call the executable path directly forAzureCliCredential
andAzureDeveloperCliCredential
.Also, adjustments were made to pass in subprocess arguments as a list which is the preferred way of passing commands/arguments to subprocesses instead of going through the shell.