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 "ref:" and "path:" versions in .tool-versions #188

Merged
merged 6 commits into from
Jan 11, 2025

Conversation

03juan
Copy link
Contributor

@03juan 03juan commented Apr 23, 2024

Overview

This change is to support the use of ref:tag/branch/commit and path:/local/tool/version tool versions.

Before: 😞
image

After: 🥳
image

Implementation notes

The code replicates the list_plugin_exec_paths() behaviour from .asdf/lib/utils.bash and integrates it into the _plugin_env_bash() version-resolution block.

Interesting/controversial decisions

Fixed Makefile target names.

Note the change in test helper also disables shellcheck SC2001 because we're matching the start of the string, which is not possible in a simple substitution.

Test coverage

The new tests cover both version types, with a necessary change to dummy_bin_path() to match the directory naming that's generated in get_install_path() and reversed in list_installed_versions().

Loose ends

Testing with dummy shims?

@03juan 03juan requested a review from a team as a code owner April 23, 2024 09:15
Copy link
Contributor

@jfly jfly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jfly jfly merged commit 951acd3 into asdf-community:master Jan 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants