Skip to content

feat: sdk default <candidate> without version should set to latest LTS #432

@chloe41427

Description

@chloe41427

Description

When calling sdk default <candidate> without specifying a version, it should set the default to the latest LTS version of that candidate. Currently, this is not working.

Expected behavior

sdk default java
# Should set java to the latest LTS version (e.g., 21 or 25)

Actual behavior

The command either fails or doesn't behave as expected.

Context

Related to discussion in #354 where we clarified the semantics of sdk default, sdk use, and sdk current.

  • sdk default <candidate> <version> — sets the global default
  • sdk use <candidate> <version> — sets version for this shell session only
  • sdk current <candidate> — reports currently active version in this shell

This feature request extends sdk default to accept being called without a version argument, inferring the latest LTS.

Acceptance criteria

  • sdk default java (no version) sets java to the latest LTS
  • Works for all candidates with LTS releases
  • Graceful error or fallback for candidates without LTS concept
  • Documented in help text and usage guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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