From 9f3d5956adf3f91cf92415f31e338ff49a5399f8 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Thu, 21 Apr 2022 12:42:00 +0800 Subject: [PATCH] fix(cli): always show error stack to unhandled rejection --- packages/docusaurus/bin/docusaurus.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs index eee4fc9919e9..1d8673a8bab8 100755 --- a/packages/docusaurus/bin/docusaurus.mjs +++ b/packages/docusaurus/bin/docusaurus.mjs @@ -274,6 +274,6 @@ if (!process.argv.slice(2).length) { cli.parse(process.argv); process.on('unhandledRejection', (err) => { - logger.error(err); + logger.error(err instanceof Error ? err.stack : err); process.exit(1); });