Skip to content
Myr

Rework exitOverride description (#2098)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Rework exitOverride description * Fix description to match implementation * Tweak wording again * Take out the first in case people think it is before displaying helper/error.

authored by John Gee · committed by GitHub · parent d8a0938 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:Readme.md+3 added-2 removed
1092 unmodified lines
10931094By default, Commander calls `process.exit` when it detects errors, or after displaying the help or version. You can override1095this behaviour and optionally supply a callback. The default override throws a `CommanderError`.10961097The override callback is passed a `CommanderError` with properties `exitCode` number, `code` string, and `message`. The default override behaviour is to throw the error, except for async handling of executable subcommand completion which carries on. The normal display of error messages or version or help1098is not affected by the override which is called after the display.1097The override callback is passed a `CommanderError` with properties `exitCode` number, `code` string, and `message`.1098Commander expects the callback to terminate the normal program flow, and will call `process.exit` if the callback returns.1099The normal display of error messages or version or help is not affected by the override which is called after the display.11001101```js1102program.exitOverride();1103
48 unmodified lines