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
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, andsdk current.sdk default <candidate> <version>— sets the global defaultsdk use <candidate> <version>— sets version for this shell session onlysdk current <candidate>— reports currently active version in this shellThis feature request extends
sdk defaultto accept being called without a version argument, inferring the latest LTS.Acceptance criteria
sdk default java(no version) sets java to the latest LTS