-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] BREAKING CHANGE: Change get_config_dir to honor XDG spec #30668
base: dev
Are you sure you want to change the base?
Conversation
This commit modifies the `get_config_dir` function to honor the XDG Base Directory Specification in accordance with https://specifications.freedesktop.org/basedir-spec/latest/, and falls back to a dot-dir in the user's home directory if the relevant environment variables and home directories do not exist.
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
Validation for Breaking Change Starting...
Thanks for your contribution! |
Thank you for your contribution! We will review the pull request and get back to you soon. |
@microsoft-github-policy-service agree |
This is a devastating breaking change. |
Yesterday, I indeed found out that it still made the ~/.azure directory after adding this change to my local setup, so yes, as it is, this is definitely breaking. And maybe for backwards-compatibility and consistency, have the first version check if the ~/.azure directory exists, and if so, use that regardless of what the XDG_CONFIG_HOME variable says. |
Description
This commit modifies the
get_config_dir
function to honor the XDG Base Directory Specification in accordance with https://specifications.freedesktop.org/basedir-spec/latest/, and falls back to a dot-dir in the user's home directory if the relevant environment variables and home directories do not exist.Testing Guide
On running the az cli, it should now refer to '${XDG_CONFIG_HOME}/azure', or '${HOME}/.config/azure'.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.