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

feat: Auto-install missing versions in asdf local. #1714

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

Commits on Jan 23, 2024

  1. feat: Auto-install missing versions in asdf local.

    I frequently want to be able to upgrade my `.tool-versions` straight to
    the newest version of a plugin with the `asdf local` command.  At the
    moment, the first repository i perform this on, i'll get an error that
    the latest version isn't installed:
    
    ```shellsession
    $ asdf local ruby latest
    version 3.3.0 is not installed for ruby ❌
    ```
    
    Instead of having to read the latest version from the error output, then
    type, e.g., `asdf install ruby 3.3.0`, then redo my command, i'd like to
    be able to have `asdf local` do the installation automatically.  This
    will save me a tedious manual step.
    
    With this change, i can do it all in one go:
    
    ```shellsession
    $ echo "local_command_auto_install_missing_version = yes" >> .asdfrc
    $ asdf local ruby latest
    ...installs Ruby 3.3.0...
    $ cat .tool-versions
    ruby 3.3.0 🎉
    ```
    toothbrush committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    54ff418 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    737a12f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c52943a View commit details
    Browse the repository at this point in the history