From 5713d30670fc9ca1f9d86e6f0698bd011a68f674 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 18 Aug 2023 04:24:41 +0000
Subject: [PATCH] ensure contentfolder is passed to popContentFolder
---
quartz/bootstrap-cli.mjs | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs
index 990022e..1178303 100755
--- a/quartz/bootstrap-cli.mjs
+++ b/quartz/bootstrap-cli.mjs
@@ -267,9 +267,15 @@
spawnSync("npm", ["i"], { stdio: "inherit" })
console.log(chalk.green("Done!"))
})
- .command("restore", "Try to restore your content folder from the cache", async () => {
- await popContentFolder()
- })
+ .command(
+ "restore",
+ "Try to restore your content folder from the cache",
+ CommonArgv,
+ async (argv) => {
+ const contentFolder = path.join(cwd, argv.directory)
+ await popContentFolder(contentFolder)
+ },
+ )
.command("sync", "Sync your Quartz to and from GitHub.", SyncArgv, async (argv) => {
const contentFolder = path.join(cwd, argv.directory)
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
@@ -300,7 +306,7 @@
if (contentStat.isSymbolicLink()) {
// put symlink back
- await popContentFolder()
+ await popContentFolder(contentFolder)
}
}
--
Gitblit v1.10.0