Skip to content

Separate command execution results from process exits in the CLI #133

Closed

Description

@LunaStev

Evidence

src/main.rs and command modules call std::process::exit directly for parser and runtime failures. This forces most CLI behavior tests to spawn the binary and makes shared diagnostics, stable exit codes, and future embedding harder.

Acceptance criteria

  • Make command handlers return structured success/failure results to one top-level exit mapper.
  • Preserve stdout, stderr, and current exit codes unless a separately specified contract from Define a stable CLI exit-code contract #90 changes them.
  • Keep help read-only and successful.
  • Add unit tests for parser/result mapping without requiring process termination.
  • Coordinate common error context with Centralize CLI diagnostics and error context #97 and avoid a broad rewrite of resolver behavior.

Activity

  1. added
    refactor
    tooling
    stability
    on Sep 22, 2026
  2. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

refactorstabilitytooling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions