From 65d75b8bdcd7376916aed715d5e73732125589fb Mon Sep 17 00:00:00 2001
From: Olivér Falvai <ofalvai@gmail.com>
Date: Tue, 02 Jan 2024 17:23:28 +0000
Subject: [PATCH] feat: support modification date reading from parent git repo (#661)
---
quartz/cli/handlers.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/quartz/cli/handlers.js b/quartz/cli/handlers.js
index 8fd0912..37762a4 100644
--- a/quartz/cli/handlers.js
+++ b/quartz/cli/handlers.js
@@ -113,7 +113,10 @@
}
}
- await fs.promises.unlink(path.join(contentFolder, ".gitkeep"))
+ const gitkeepPath = path.join(contentFolder, ".gitkeep")
+ if (fs.existsSync(gitkeepPath)) {
+ await fs.promises.unlink(gitkeepPath)
+ }
if (setupStrategy === "copy" || setupStrategy === "symlink") {
let originalFolder = sourceDirectory
@@ -528,7 +531,7 @@
await popContentFolder(contentFolder)
if (argv.push) {
console.log("Pushing your changes")
- const res = spawnSync("git", ["push", "-f", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], {
+ const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], {
stdio: "inherit",
})
if (res.status !== 0) {
--
Gitblit v1.10.0