Description
When running commands programmatically or inside CI/CD scripts, users may want to suppress the debug logs and visual dividers printed by catch-cli to keep their output stream clean.
Proposed Solution
-
Argument Parsing (index.js):
- Parse
process.argv to check if --silent or -s is passed as a flag.
- If found, strip it from the argument list so it is not forwarded to the child process execution.
- Set a boolean flag, e.g.,
isSilent = true.
-
Output Suppression:
- If
isSilent is true, suppress the [CATCH] Analyzing crash... status output, and do not print the decorative = line breaks around the AI explanation.
- Only the raw AI explanation text should be printed to the terminal.
Definition of Done
- Running
catch --silent <command> runs the command normally.
- If a crash occurs, only the raw diagnostic text is output, without utility headers or styling bars.
Description
When running commands programmatically or inside CI/CD scripts, users may want to suppress the debug logs and visual dividers printed by
catch-clito keep their output stream clean.Proposed Solution
Argument Parsing (
index.js):process.argvto check if--silentor-sis passed as a flag.isSilent = true.Output Suppression:
isSilentis true, suppress the[CATCH] Analyzing crash...status output, and do not print the decorative=line breaks around the AI explanation.Definition of Done
catch --silent <command>runs the command normally.