Skip to content
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

Support XDG directories #79

Merged
merged 7 commits into from
Aug 8, 2024
Merged

Conversation

bepoli
Copy link
Contributor

@bepoli bepoli commented Jul 26, 2024

Checklist

  • Added a news entry

This PR make condax comply with XDG Base Directory specifications. When ~/.condaxrc is not present, it will be searched into $XDG_CONFIG_HOME/condax/condaxrc and $XDG_CONFIG_HOME/condax/.condaxrc, following this order of priority.
This feature has already been added in conda, mamba and micromamba.

NB: the other condax directories can be made compliant to the XDG schemas by adding this line in condaxrc: prefix_path: "~/.local/share/condax".

UPDATE: on second thought, I might as well add all the directories looked by conda, including /etc/condax and /var/lib/condax for system-wide configurations.
So, this would be the priority for the search path (higher to lower):

  1. $CONDAXRC (if variable is set)
  2. ~/.condaxrc
  3. $XDG_CONFIG_HOME/condax/condaxrc (if variable is set)
  4. $XDG_CONFIG_HOME/condax/.condaxrc (if variable is set)
  5. ~/.condax/condaxrc
  6. ~/.condax/.condaxrc
  7. ~/.config/condax/condaxrc
  8. ~/.config/condax/.condaxrc
  9. /etc/condax/condaxrc
  10. /etc/condax/.condaxrc
  11. /var/lib/condax/condaxrc
  12. /var/lib/condax/.condaxrc

How does it look?

@mariusvniekerk mariusvniekerk merged commit b20c7fe into mariusvniekerk:main Aug 8, 2024
7 checks passed
@bepoli bepoli deleted the xdg_config branch August 8, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants