Jacky Zhao
2023-08-24 98d82415dc8d60c3a35ea4dee21c86e406605763
fix: lock to never read when site is building
1 files modified
2 ■■■■■ changed files
quartz/bootstrap-cli.mjs 2 ●●●●● patch | view | raw | blame | history
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) => {