(msg?: string)
| 17 | |
| 18 | /** Write an error message to stderr (if given) and exit with code 1. */ |
| 19 | export function cliError(msg?: string): never { |
| 20 | // biome-ignore lint/suspicious/noConsole: centralized CLI error output |
| 21 | if (msg) console.error(msg) |
| 22 | process.exit(1) |
| 23 | return undefined as never |
| 24 | } |
| 25 | |
| 26 | /** Write a message to stdout (if given) and exit with code 0. */ |
| 27 | export function cliOk(msg?: string): never { |
no test coverage detected