Skip to content

Commit 6ecacd8

Browse files
committed
fix: 🐛 cli error handling
1 parent 05284da commit 6ecacd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cli/src/utils/handle-error.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ export function handleError(error: unknown) {
2525
}
2626

2727
if (error instanceof Error) {
28-
logger.error(error?.message || JSON.stringify({ error }));
28+
logger.error(error.message);
2929
logger.break();
3030
process.exit(1);
3131
}
3232

33+
logger.error(JSON.stringify({ error }));
34+
3335
logger.break();
3436
process.exit(1);
3537
}

0 commit comments

Comments
 (0)