JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.02k stars 2.37k forks source link

Az Segment does not work with custom config dir in AZURE_CONFIG_DIR #1775

Closed mwiedemeyer closed 2 years ago

mwiedemeyer commented 2 years ago

Code of Conduct

What happened?

I'm using different az cli environments as described here: https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration#cli-configuration-file That means that the config folder should not be hard coded as .azure but should use the environment variable AZURE_CONFIG_DIR if it exists. Else the az segment uses the wrong information not reflecting the data from the actual az account show

The issue exists on Windows (PowerShell) and on Ubuntu bash.

Theme

{ "background": "#36B9EE", "foreground": "#000000", "powerline_symbol": "\ue0b0", "properties": { "display_id": false, "display_name": true, "info_separator": " @ ", "template": " \ufd03 {{ .Name }}" }, "style": "powerline", "type": "az" },

What OS are you seeing the problem on?

No response

Which shell are you using?

No response

Log output

2022/02/18 11:30:53 Pwd duration: 1.36µs, args:
2022/02/18 11:30:53 FileContent duration: 3.017629ms, args: /home/marco/.azure/azureProfile.json
2022/02/18 11:30:53 TemplateCache duration: 160ns, args:
2022/02/18 11:30:53 debug: Pwd
JanDeDobbeleer commented 2 years ago

@mwiedemeyer thanks for this info, that's an easy fix 👍🏻

mwiedemeyer commented 2 years ago

Thank you very much! Awesome project, awesome support! 🥰

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.