From b7ca7eb30127459a0ba1d106d23100b40b5cd9d8 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 17 Aug 2023 21:49:58 -0700 Subject: [PATCH] ensure sync includes untracked files --- quartz/bootstrap-cli.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs index 11783035..a39e2915 100755 --- a/quartz/bootstrap-cli.mjs +++ b/quartz/bootstrap-cli.mjs @@ -192,7 +192,7 @@ yargs(hideBin(process.argv)) await rmContentFolder() if (setupStrategy === "copy") { - await fs.promises.cp(originalFolder, contentFolder, { recursive: true }) + await fs.promises.cp(originalFolder, contentFolder, { recursive: true, preserveTimestamps: true }) } else if (setupStrategy === "symlink") { await fs.promises.symlink(originalFolder, contentFolder, "dir") } @@ -292,7 +292,6 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started. // follow symlink and copy content await fs.promises.cp(linkTarg, contentFolder, { - force: true, recursive: true, preserveTimestamps: true, }) @@ -302,7 +301,8 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started. dateStyle: "medium", timeStyle: "short", }) - spawnSync("git", ["commit", "-am", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" }) + spawnSync("git", ["add", "."], { stdio: "inherit" }) + spawnSync("git", ["commit", "-m", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" }) if (contentStat.isSymbolicLink()) { // put symlink back