Skip to content

local use with an unparseable version prints a double-wrapped error message #340

Description

@sdairs

Found during 0.4.0 RC local-command testing (2026-07-30).

Observed

$ chctl local use not.a.version
Error: No matching version found for: invalid version 'not.a.version': all parts must be numeric
(exit 1)

Two error layers are concatenated: the outer "No matching version found for:" (which expects a version string after the colon) wraps the inner parse error "invalid version '...': all parts must be numeric". The result reads as garbled — "no matching version found for: invalid version" is not a sentence.

Expected

A parse failure should short-circuit before the lookup path adds its wrapper:

Error: invalid version 'not.a.version': all parts must be numeric

Purely an error-plumbing fix in the version-resolution path (the inner error is already the right message).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions