fix: shim and preset plugin mismatch message#1724
Open
bootleq wants to merge 2 commits into
Open
Conversation
83a0054 to
897ea7f
Compare
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
897ea7f to
de6b0d9
Compare
Member
|
Hi @bootleq , I merged #1805 this week which rewrites asdf in Golang. Can you test out the latest dev version? Download a dev binary from https://github.com/asdf-vm/asdf/releases/tag/54d15e3, or run |
Contributor
Author
|
Yes, @Stratus3D, the issue still exists with latest dev. |
Member
|
Thanks @bootleq , this is an important fix. I'm going to translate this solution to the new Go. It may take me a couple weeks to get to it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
