AZ_* environment variables missing #984
Unanswered
bytepl
asked this question in
Troubleshoot
Replies: 1 comment 5 replies
-
You need to either have the az command and authenticated OR the Powershell module available and authenticated with the env var set as you did. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to add Azure segment to my prompt but it's missing, whatever I do. I added a segment to the theme but it does not seem to do anything:
{
"type": "az",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#9ec3f0",
"properties": {
"display_id": true,
"display_name": true,
"info_separator": " @ ",
"prefix": " \uFD03 "
}
Write-PoshDebug shows that the segment evaluates to false, at the same time Get-AzContext shows that I am connected.
I have noticed that I am missing AZ_* variables in my session, the only one present is AZ_ENABLED (set to 'True'). I tried adding any of the following manually but nothing happens, these just not show up:
AZ_ENVIRONMENT_NAME
AZ_USER_NAME
AZ_SUBSCRIPTION_ID
AZ_ACCOUNT_NAME
Should these variables be set up by Connect-AzAccount?
Looks like oh-my-posh is looking for these variables:
2021/09/22 11:50:40 getenv duration: 0s, args: AZ_ENVIRONMENT_NAME
2021/09/22 11:50:40 getenv duration: 0s, args: AZ_USER_NAME
2021/09/22 11:50:40 getenv duration: 0s, args: AZ_SUBSCRIPTION_ID
2021/09/22 11:50:40 getenv duration: 0s, args: AZ_ACCOUNT_NAME
Beta Was this translation helpful? Give feedback.
All reactions