From 9851697b583efdd40173ebbdd484030f2adb0732 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 24 Aug 2023 16:05:19 +0000
Subject: [PATCH] version bump to 4.0.10

---
 quartz/bootstrap-cli.mjs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs
index 1656d75..b191b49 100755
--- a/quartz/bootstrap-cli.mjs
+++ b/quartz/bootstrap-cli.mjs
@@ -162,7 +162,6 @@
             label: "Symlink an existing folder",
             hint: "don't select this unless you know what you are doing!",
           },
-          { value: "keep", label: "Keep the existing files" },
         ],
       }),
     )
@@ -176,6 +175,7 @@
       }
     }
 
+    await fs.promises.unlink(path.join(contentFolder, ".gitkeep"))
     if (setupStrategy === "copy" || setupStrategy === "symlink") {
       const originalFolder = escapePath(
         exitIfCancel(
@@ -205,8 +205,6 @@
         await fs.promises.symlink(originalFolder, contentFolder, "dir")
       }
     } else if (setupStrategy === "new") {
-      await rmContentFolder()
-      await fs.promises.mkdir(contentFolder)
       await fs.promises.writeFile(
         path.join(contentFolder, "index.md"),
         `---
@@ -459,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,
@@ -473,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