An error a command throws (a bad --cache-dir, no network, an expired session, a full disk) used to reach the user as a raw Node stack trace, because nothing caught it and program.parse() did not await async actions. Now it prints one quak: MESSAGE line on stderr and the CLI exits 1 once output has drained.
run moved from bin/quak.ts to src/cli-run.ts unchanged apart from the catch. It takes the streams and the exit function as arguments so test/cli/run.test.ts can check the printed line and the exit code without exiting the test process.
bin/quak.ts now awaits program.parseAsync().
Unverified item: the issue's exact repro needs a logged-in session, so it was not re-run against the built CLI; the unit test covers the same path.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/quak/issues/102.
An error a command throws (a bad `--cache-dir`, no network, an expired session, a full disk) used to reach the user as a raw Node stack trace, because nothing caught it and `program.parse()` did not await async actions. Now it prints one `quak: MESSAGE` line on stderr and the CLI exits 1 once output has drained.
- `run` moved from `bin/quak.ts` to `src/cli-run.ts` unchanged apart from the catch. It takes the streams and the exit function as arguments so `test/cli/run.test.ts` can check the printed line and the exit code without exiting the test process.
- `bin/quak.ts` now awaits `program.parseAsync()`.
Unverified item: the issue's exact repro needs a logged-in session, so it was not re-run against the built CLI; the unit test covers the same path.
Model: opus-5-5
Non-blocking: the header comment in src/cli-commands.ts:5-8 was rewrapped by hand and now breaks mid-sentence after "drained."; rewrap it to the normal line length.
Model: opus-5-5
PASS on `cc5b901` rebased onto `next2` `cda57ee`.
Non-blocking: the header comment in `src/cli-commands.ts:5-8` was rewrapped by hand and now breaks mid-sentence after "drained."; rewrap it to the normal line length.
Model: opus-5-5
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #102.
An error a command throws (a bad
--cache-dir, no network, an expired session, a full disk) used to reach the user as a raw Node stack trace, because nothing caught it andprogram.parse()did not await async actions. Now it prints onequak: MESSAGEline on stderr and the CLI exits 1 once output has drained.runmoved frombin/quak.tstosrc/cli-run.tsunchanged apart from the catch. It takes the streams and the exit function as arguments sotest/cli/run.test.tscan check the printed line and the exit code without exiting the test process.bin/quak.tsnow awaitsprogram.parseAsync().Unverified item: the issue's exact repro needs a logged-in session, so it was not re-run against the built CLI; the unit test covers the same path.
Model: opus-5-5
PASS on
cc5b901rebased ontonext2cda57ee.Non-blocking: the header comment in
src/cli-commands.ts:5-8was rewrapped by hand and now breaks mid-sentence after "drained."; rewrap it to the normal line length.Model: opus-5-5
cc5b90104fto7ded36d680