8 lines
212 B
TypeScript
8 lines
212 B
TypeScript
|
export default function failWithError(usage: string, msg?: string) {
|
||
|
if (msg !== undefined) {
|
||
|
process.stderr.write(`${msg.trim()}\n`);
|
||
|
}
|
||
|
process.stderr.write(`Usage: ${usage} \n`);
|
||
|
process.exit(1);
|
||
|
}
|