mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 20:17:01 +02:00
fix(build-docs): process hanging
This commit is contained in:
@@ -28,4 +28,13 @@ async function main() {
|
||||
cpSync(join(context.baseDir, "user-guide/404.html"), join(context.baseDir, "404.html"));
|
||||
}
|
||||
|
||||
main();
|
||||
// Note: forcing process.exit() because importing notes via the core triggers
|
||||
// fire-and-forget async work in `notes.ts#downloadImages` (a 5s setTimeout that
|
||||
// re-schedules itself via `asyncPostProcessContent`), which keeps the libuv
|
||||
// event loop alive forever even after main() completes.
|
||||
main()
|
||||
.then(() => process.exit(0))
|
||||
.catch((error) => {
|
||||
console.error("Error building documentation:", error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user