Skip to content

Commit

Permalink
always exit postbuild process (#8514)
Browse files Browse the repository at this point in the history
* always exit postbuild process - hopefully fixes #8512

* make test fail if process is not exited
  • Loading branch information
Rich-Harris authored Jan 13, 2023
1 parent 37ed70b commit 6c2a67c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-kings-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: exit postbuild step with code 0
2 changes: 2 additions & 0 deletions packages/kit/src/core/postbuild/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ writeFileSync(
value instanceof Map ? Array.from(value.entries()) : value
)
);

process.exit(0);
5 changes: 5 additions & 0 deletions packages/kit/test/prerendering/basics/src/hooks.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ export const handle = async ({ event, resolve }) => {
filterSerializedResponseHeaders: (name) => name === 'content-type'
});
};

// this code is here to make sure that we kill the process
setInterval(() => {
console.log('process is still alive');
}, 5000);

0 comments on commit 6c2a67c

Please sign in to comment.