docx-validate
    Preparing search index...

    Function commanderExitCode

    • Translate a thrown Commander error (raised by cmd.exitOverride() on missing args, invalid options, or --help) into the exit code Commander intended. Falls back to 1 for non-Commander errors so callers can use this from a generic catch (err) block.

      Commander already writes the user-facing message before the error throws, so callers should NOT re-emit the message themselves.

      Parameters

      • err: unknown

      Returns number