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