Skip to content

Commit

Permalink
fix(cli): should catch build errors (#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Mar 11, 2025
1 parent 8e62083 commit 69a140e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,16 @@ cli.command('build [root]').action(async (root, options) => {
config.root = resolveDocRoot(cwd, root, config.root);
const docDirectory = config.root;

await build({
appDirectory: cwd,
docDirectory,
config,
});
try {
await build({
appDirectory: cwd,
docDirectory,
config,
});
} catch (err) {
logger.error(err);
process.exit(1);
}
});

cli
Expand Down

0 comments on commit 69a140e

Please sign in to comment.