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
bug: asdf uses .tool-versions instead of configured ASDF_DEFAULT_TOOL_VERSIONS_FILENAME #1082
Comments
I confirmed this is a problem on my machine. PR to fix is welcome. |
Just ran into this too. Looks like it would not be too hard to fix. A move from https://github.com/asdf-vm/asdf/blob/v0.9.0/lib/utils.bash#L215-L221 to before https://github.com/asdf-vm/asdf/blob/v0.9.0/lib/utils.bash#L192. (Or equivalent lines on HEAD.) However, the description of the second test at https://github.com/asdf-vm/asdf/blob/v0.9.0/test/utils.bats#L214-L232 has me wondering if there is maybe some deeper intentional behavior here. That said, in the process of looking into this, I found a |
@emcd Indeed, I have been able to work around this using the |
@Stratus3D is ASDF_DEFAULT_TOOL_VERSIONS_FILENAME only expected to work with global commands? When looking at asdf/lib/commands/version_commands.bash Lines 20 to 26 in 853eede
|
@squaresurf good observation. I'm not certain what the intent was there with that code. If you're using |
@matthijsqd @squaresurf the issues both of you reported should be fixed now on latest master. If you want to test it upgrade with |
Describe the Bug
When the environment variable ASDF_DEFAULT_TOOL_VERSIONS_FILENAME is set to e.g.
.tool-versions-foobar
, but there is still a.tool-versions
file present, asdf used the.tool-versions
file instead of the configured name. When the.tool-versions
file is removed, the correct file is used.I expected the configured name to take precedence, particularly because the documentation states: "Typically you should not override the default value unless you know you want asdf to ignore .tool-versions files".
Steps to Reproduce
export ASDF_DEFAULT_TOOL_VERSIONS_FILENAME='.tool-versions-foobar'
asdf current
Expected Behaviour
Actual Behaviour
Environment
asdf plugins affected (if relevant)
No response
The text was updated successfully, but these errors were encountered: