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

fix: shim and preset plugin mismatch message #1724

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bootleq
Copy link

@bootleq bootleq commented Feb 24, 2024

Summary

Detect the case "missing preset plugin" is in fact installed, print different message instead of the misleading one.

Fixes: #928

Other Information

Example output:
sample-output

@bootleq bootleq requested a review from a team as a code owner February 24, 2024 08:06
Simulation steps, where dummy/dummyman behave like node/npm

- User install dummy 1.0, with `dummyman` command shimmed
- User install dummy 1.3
- User run `dummyman`

will print incorrect message which suggest to install `dummy 1.3` (has
already installed), or set `dummy 1.0` in tool-versions (is not what
user want).
When a shimmed command can't find usable plugin version, we used to do
several detection then output suggestion to user.

The original message assumes "preset" plugin version is not installed,
which could be false when shimmed command has old `asdf-plugin:` version
written, while not being updated when install newer plugin version.

Here add small `preset_plugin_installed` flag to detect if any
considered "missing" plugin is in fact exist. Print only simple message
for it.

Example output:

    Shimmed command 'yarn' has no matched plugin version
    Check the executable or try install yarn for your preset plugin version
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 this pull request may close these issues.

Identify different class of error between *missing version* from *requiring a reshim*
1 participant