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

feat: Full compliance with XDG Base Directory Specification #1351

Closed
wants to merge 1 commit into from

Conversation

hyperupcall
Copy link
Contributor

@hyperupcall hyperupcall commented Oct 17, 2022

Summary

This changes things so that:

  • ASDF_CONFIG_FILE
    • If env var is empty, and old default location does not exist, new default is $XDG_CONFIG_HOME/asdf/asdfrc
    • Docs
    • Source/completion scripts
    • Tests
  • ASDF_DEFAULT_TOOL_VERSIONS_FILENAME (N/A, no change needed)
  • ASDF_DEFAULT_GLOBAL_TOOL_VERSIONS_FILEPATH
    • Impl
    • Docs
    • Tests
  • ASDF_DIR
    • No change needed (is calculated dynamically)
  • ASDF_DATA_DIR
    • If env var is empty, and old location does not exist, new default is "$XDG_STATE_HOME/asdf"
    • Docs
    • Source/completion scripts
    • Tests

Each environment variable is exported so that they new values are automatically used by plugins. If plugins use the environment variables, everything should Just Work

What still needs to be done:

  • ~/.config/asdf/.tool-versions
  • Documentation changes
  • Installation instructions / script to update to use XDG_DATA_HOME (for the git repository) (for ASDF_DIR)
  • Completion scripts to use the new location
    • completions/_asdf shows an example of how it should be done for Fish, Bash, etc. completions
  • asdf.sh use the new location

Fixes #687
Fixes asdf-vm/asdf-ruby#203
Fixes #1553 (TODO)
Fixes #1556 (TODO)
Fixes #1617
Fixes #846
Fixes #1309
TODO: Look at #1122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment