Skip to content

Commit

Permalink
Add exit to keystone build
Browse files Browse the repository at this point in the history
  • Loading branch information
borisno2 committed Aug 29, 2023
1 parent 859257a commit 67dae46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/next-build-exit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-6/core': minor
---

Fixes `keystone build` hanging with latest versions of NextJS
12 changes: 7 additions & 5 deletions packages/core/src/scripts/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { cli } from './cli';
import { ExitError } from './utils';

cli(process.cwd(), process.argv.slice(2)).catch(err => {
if (err instanceof ExitError) return process.exit(err.code);
cli(process.cwd(), process.argv.slice(2))
.then(() => process.exit(0))
.catch(err => {
if (err instanceof ExitError) return process.exit(err.code);

console.error(err);
process.exit(1);
});
console.error(err);
process.exit(1);
});

0 comments on commit 67dae46

Please sign in to comment.