From 98d82415dc8d60c3a35ea4dee21c86e406605763 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 24 Aug 2023 15:31:12 +0000
Subject: [PATCH] fix: lock to never read when site is building
---
quartz/bootstrap-cli.mjs | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs
index b973317..b191b49 100755
--- a/quartz/bootstrap-cli.mjs
+++ b/quartz/bootstrap-cli.mjs
@@ -457,6 +457,7 @@
req.url = req.url?.slice(argv.baseDir.length)
const serve = async () => {
+ const release = await buildMutex.acquire()
await serveHandler(req, res, {
public: argv.output,
directoryListing: false,
@@ -471,6 +472,7 @@
const statusString =
status >= 200 && status < 300 ? chalk.green(`[${status}]`) : chalk.red(`[${status}]`)
console.log(statusString + chalk.grey(` ${argv.baseDir}${req.url}`))
+ release()
}
const redirect = (newFp) => {
--
Gitblit v1.10.0