e906a3130eb5031a2c82d9187ea17387881631db
- Author
- Carlo Sala <carlosalag@protonmail.com>
- Committer
- Carlo Sala <carlosalag@protonmail.com>
- Date
Message
fix(azure): look properly for azure config file
Closes #11606
Diff
1diff --git a/plugins/azure/azure.plugin.zsh b/plugins/azure/azure.plugin.zsh
2index 51b54dbc11b04032d0b442e4786f3e55e697b72e..8fec3c1f7c4e04100906941454e690e4e77d974e 100644
3--- a/plugins/azure/azure.plugin.zsh
4+++ b/plugins/azure/azure.plugin.zsh
5@@ -18,10 +18,10 @@ compctl -K _az_subscriptions azss
6
7 # Azure prompt
8 function azure_prompt_info() {
9- [[ ! -f "${AZURE_CONFIG_DIR:-$HOME/.azure/azureProfile.json}" ]] && return
10+ [[ ! -f "${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json" ]] && return
11 # azgs is too expensive, if we have jq, we enable the prompt
12 (( $+commands[jq] )) || return 1
13- azgs=$(jq -r '.subscriptions[] | select(.isDefault==true) .name' ${AZURE_CONFIG_DIR:-$HOME/.azure/azureProfile.json})
14+ azgs=$(jq -r '.subscriptions[] | select(.isDefault==true) .name' "${AZURE_CONFIG_DIR:-$HOME/.azure}/azureProfile.json")
15 echo "${ZSH_THEME_AZURE_PREFIX:=<az:}${azgs}${ZSH_THEME_AZURE_SUFFIX:=>}"
16 }
17