Print CLI errors as one line instead of a stack trace (closes #102)
check / check (push) Successful in 1m13s
check / check (push) Successful in 1m13s
An error a command throws now reaches the user as one `quak: MESSAGE` line on stderr, and the CLI exits 1 once output has drained. The wrapper moved from bin/quak.ts to src/cli-run.ts so it can be tested, and bin/quak.ts awaits program.parseAsync() so async actions are awaited. Model: opus-5-5
This commit was merged in pull request #121.
This commit is contained in:
+3
-2
@@ -2,8 +2,9 @@
|
||||
//
|
||||
// Each command takes its options and a `CliContext` and resolves to the exit
|
||||
// code; a thrown error is left to the caller. Nothing here calls
|
||||
// `process.exit`: `bin/quak.ts` wires these to the command line and exits with
|
||||
// the returned code once output has drained. Output must stay byte-identical
|
||||
// `process.exit`: `bin/quak.ts` wires these to the command line, and `run` in
|
||||
// `cli-run.ts` prints a thrown error as one line and exits once output has
|
||||
// drained. Output must stay byte-identical
|
||||
// (see `cli-output.ts`).
|
||||
|
||||
import { input, password as passwordPrompt } from "@inquirer/prompts";
|
||||
|
||||
Reference in New Issue
Block a user