Files
e-tib.com/node_modules/.pnpm/cspell@9.7.0/node_modules/cspell/bin.mjs
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

20 lines
735 B
JavaScript
Executable File

#!/usr/bin/env node
import { format } from 'node:util';
import { CommanderError, program } from 'commander';
import { ApplicationError, CheckFailed, run } from './dist/esm/app.js';
run(program, process.argv).catch((e) => {
if (!(e instanceof CommanderError) && !(e instanceof CheckFailed)) {
const verbose = process.argv.includes('--verbose') || process.argv.includes('-v');
const msg = !verbose && e instanceof ApplicationError ? e.message : format(e);
process.stdout.write(msg + '\n');
// It is possible an explicit exit code was set, use it if it was.
process.exitCode = process.exitCode || 1;
}
if (e instanceof CheckFailed) {
process.exitCode = e.exitCode;
}
});