Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: any shim should default to "system" version when no global or local is set #1559

@xaf

Description

@xaf

Is your feature request related to a problem? Please describe

Using tools such as rbenv and goenv are not making things incompatible with system versions of the softwares. This means that if I'm in a directory with a .ruby-version or .go-version, the specified version is going to be used. But if outside such directory tree, and if a global version is not set, but I do have a system version of the tool, then that system version is going to be used.

That means that using rbenv or goenv are not forcing me to set a global version to keep using my tools outside of locally-defined versions, they "just work". asdf does not, showing the following message:

No version is set for command <tool>
Consider adding one of the following versions in your config file at
((list of installed "<tool> <version>" for <tool>))

Describe the proposed solution

When no global or local is set, before showing the No version is set for command for a shim, asdf should look through the path if such command, outside of the asdf path, does exist, and if such, default to using it.

asdf current could maybe also show system when using the system version of a tool.

Describe similar asdf features and why they are not sufficient

The only alternative is setting a global version (asdf global <tool> system)
This still requires a manual operation, while this should be the default operation.

Describe other workarounds you've considered

Using other tools than asdf such as goenv, rbenv, pyenv, that do not allow to centralize all that logic into a single tool... but do allow support for the system version of the tools.
I do believe asdf would benefit from that change.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions