Skip to content

Commit 5e31c41

Browse files
chore: minor change
1 parent 0bb8781 commit 5e31c41

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/bin.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ function shouldShowCustomHelp(args: string[]): boolean {
1818
async function main(): Promise<void> {
1919
const args = process.argv.slice(2);
2020

21-
// Intercept top-level help before Stricli
22-
if (shouldShowCustomHelp(args)) {
23-
await printCustomHelp(process.stdout);
24-
return;
25-
}
26-
2721
try {
28-
await withTelemetry(() => run(app, args, buildContext(process)));
22+
await withTelemetry(async () => {
23+
// Intercept top-level help before Stricli
24+
if (shouldShowCustomHelp(args)) {
25+
await printCustomHelp(process.stdout);
26+
return;
27+
}
28+
29+
run(app, args, buildContext(process));
30+
});
2931
} catch (err) {
3032
process.stderr.write(`${error("Error:")} ${formatError(err)}\n`);
3133
process.exit(getExitCode(err));

0 commit comments

Comments
 (0)