Skip to content

Propagate exit code from REPL to process exit status #16

@cdprice02

Description

@cdprice02

src/shell.rs lines 74-76 and 106 have TODO comments about setting exit codes in the caller environment rather than just breaking from the loop. Currently exit 0 and exit 1 both break the REPL but the exit code is discarded — ferrish's process always exits with status 0 regardless.

Expected behavior: Propagate the ExitCode from execute_command through run() and use std::process::exit() (or return it to main) so that the ferrish process reflects the requested exit status.

Acceptance criteria:

  • exit 1 causes the ferrish process to exit with status 1
  • exit 0 causes the ferrish process to exit with status 0
  • The TODO comments in shell.rs are resolved
  • This is critical for predictable semantics

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrefactorImprove the codebase

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions