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 for $HOME/.config/asdf/asdfrc? #203

Open
brandondrew opened this issue Feb 19, 2021 · 1 comment
Open

Support for $HOME/.config/asdf/asdfrc? #203

brandondrew opened this issue Feb 19, 2021 · 1 comment

Comments

@brandondrew
Copy link

The nature of this request depends on whether you already support keeping asdf's rc file inside $HOME/.config or not.

If so, that's awesome. Would you consider adding that to the README (mentioning that location along with $HOME/.asdfrc)?

If not, then would you consider adding support for that?

Or alternately, if you don't have time to add support for that, would you accept a PR that added such support?

@cho-m
Copy link

cho-m commented Feb 28, 2021

I think the location of asdf's config file is managed by the core asdf repo.
The rc file should have already been processed/parsed before making use of this ruby plugin.

The ASDF_CONFIG_FILE environment variable is supposed to allow a user to change location of the file to any arbitrary file path: https://github.com/asdf-vm/asdf/blob/0f75c2162944f50120906ba61faa62783cecfcb5/lib/utils.bash#L371.

The main documentation for this is on the asdf homepage, which is also saved inside asdf repo as markdown file.

There is nothing specific to $HOME/.config. That would be up to the user to manage like adding the following into shell's environment:

export ASDF_CONFIG_FILE="$HOME/.config/asdf/asdfrc"

or for someone who wants to use XDG directories:

export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/asdf/asdfrc"
export ASDF_DEFAULT_TOOL_VERSIONS_FILENAME="${XDG_CONFIG_HOME:-$HOME/.config}/asdf/tool-versions"
export ASDF_DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/asdf"

The latter is what I use and it works for Ruby legacy_version_file.

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 a pull request may close this issue.

2 participants