Skip to content

[FEAT] Support SDKMAN! Package Count #2027

@iskandergaba

Description

@iskandergaba

Description

Add SDKMAN! package count to the output.

Motivation

I think this falls under the same category as other package managers. SDKMAN! is popular and widely used across multiple Unix platforms to install system-wide SDKs and frameworks.

Additional context

This should be relatively easy and useful for those using SDKMAN! to install SDKs and packages. Here's how to detect the count:

  1. Get the candidates' directory from the variable $SDKMAN_CANDIDATES_DIR. If it is empty, then SDKMAN! is not installed.
  2. Count the number of non-empty directories inside $SDKMAN_CANDIDATES_DIR. SDKMAN! can leave empty directories for uninstalled SDK candidates, so it is important to count the non-empty directories only (i.e., a bit more involved than a simple getNumElements call).

Note that this counts every SDK or framework installed as 1 (even if there are multiple versions installed for it), which is, in my opinion, the correct thing to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions