Skip to content

Fix addon CLI exit code propagation #1275

Description

@cedric013

Problem

lean-ctx addon command handlers should not terminate the process from inside addon-specific logic. The addon command already returns an integer status code, but the top-level CLI dispatch path must propagate that code so failures from addon subcommands reach the shell.

Expected

  • addon subcommands remain testable and return status codes instead of calling process::exit internally
  • top-level lean-ctx addon ... exits non-zero when addon command handling returns non-zero
  • invalid addon actions report the error and exit with code 1

Validation

  • lean-ctx addon unknown-action should return exit code 1 and print addon help
  • no process::exit calls should remain in rust/src/cli/addon_cmd.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliCLI commands / dispatchpriority: mediumNormalstatus: integratedFix merged to main but NOT yet in a tagged release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions