Skip to content

Commit 1306dff

Browse files
committed
fix(cli): drop useless setTimeout
1 parent 52953dd commit 1306dff

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

@commitlint/cli/src/cli.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,12 @@ const cli = yargs
103103
`[input] reads from stdin if --edit, --env, --from and --to are omitted`
104104
).argv;
105105

106-
main(cli).catch(err =>
107-
setTimeout(() => {
108-
if (err.type === pkg.name) {
109-
process.exit(1);
110-
}
111-
throw err;
112-
}, 0)
113-
);
106+
main(cli).catch(err => {
107+
if (err.type === pkg.name) {
108+
process.exit(1);
109+
}
110+
throw err;
111+
});
114112

115113
async function main(options: CliFlags) {
116114
const raw = options._;

0 commit comments

Comments
 (0)