Skip to content

fix: harden command paths and filesystem state handling #455

Open

Description

@keys-i

Problem

Candidate/version paths, current-version state, and tests are handled inconsistently, causing unsafe deletion risks, memory leaks, and weak coverage.

Acceptance criteria

  • Validate candidate/version inputs as single path components.
  • Protect active versions across absolute, relative, normalized, dangling, and copied-current states.
  • Remove candidate memory leaks and safely handle empty/non-UTF-8 SDKMAN_DIR.
  • Enforce version arguments, provide user-facing errors, and keep help aliases executable.
  • Use command-scoped test environments with parameterized cases and filesystem postconditions.
  • Preserve valid output and cross-platform behavior without new dependencies or APIs.

Verification

Run formatting, locked checks, strict Clippy, tests, and actionlint; cover traversal, current-link variants, empty configuration, and missing version metadata.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions