Skip to content

Feature: sdk pin command with flexible version matching #402

@chloe41427

Description

@chloe41427

Introduce a sdk pin command that allows pinning a candidate to a flexible version selector rather than an exact version.

This is particularly useful for .sdkmanrc — teams can declare "this project needs Java 17" without locking to a specific patch release or distribution, and SDKMAN resolves to whatever matching version the user has installed.

Proposed selectors

  • sdk pin java 17 — pin to latest installed Java 17 (any distribution)
  • sdk pin java 17-tem — pin to latest installed Temurin 17
  • sdk pin java latest — pin to the latest installed version overall

Behaviour

  • Resolves at runtime to the best matching locally installed version
  • Fails clearly if no matching version is installed

Related

  • sdkman-cli #920 (closed — fuzzy version matching request)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions