From 0493942c79f8528ca8bef6cd8e2f634275f03119 Mon Sep 17 00:00:00 2001
From: kon-foo <25391223+kon-foo@users.noreply.github.com>
Date: Mon, 19 Feb 2024 19:04:27 +0000
Subject: [PATCH] fix: remove assets via globs to avoid volume mount lock (#877)

---
 quartz/build.ts |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/quartz/build.ts b/quartz/build.ts
index 452a2f1..3d95f31 100644
--- a/quartz/build.ts
+++ b/quartz/build.ts
@@ -60,7 +60,7 @@
 
   const release = await mut.acquire()
   perf.addEvent("clean")
-  await rimraf(output)
+  await rimraf(path.join(output, "*"), { glob: true })
   console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`)
 
   perf.addEvent("glob")
@@ -375,7 +375,7 @@
 
     // TODO: we can probably traverse the link graph to figure out what's safe to delete here
     // instead of just deleting everything
-    await rimraf(argv.output)
+    await rimraf(path.join(argv.output, ".*"), { glob: true })
     await emitContent(ctx, filteredContent)
     console.log(chalk.green(`Done rebuilding in ${perf.timeSince()}`))
   } catch (err) {

--
Gitblit v1.10.0