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

Commits on Feb 24, 2024

  1. Add test to reproduce the misleading message

    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).
    bootleq committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    609bb89 View commit details
    Browse the repository at this point in the history
  2. Provide dedicated message for obsolete shim case

    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
    bootleq committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    83a0054 View commit details
    Browse the repository at this point in the history