mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 19:46:23 +00:00
ensure contentfolder is passed to popContentFolder
This commit is contained in:
parent
a130945443
commit
5713d30670
1 changed files with 10 additions and 4 deletions
|
@ -267,9 +267,15 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
||||||
spawnSync("npm", ["i"], { stdio: "inherit" })
|
spawnSync("npm", ["i"], { stdio: "inherit" })
|
||||||
console.log(chalk.green("Done!"))
|
console.log(chalk.green("Done!"))
|
||||||
})
|
})
|
||||||
.command("restore", "Try to restore your content folder from the cache", async () => {
|
.command(
|
||||||
await popContentFolder()
|
"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) => {
|
.command("sync", "Sync your Quartz to and from GitHub.", SyncArgv, async (argv) => {
|
||||||
const contentFolder = path.join(cwd, argv.directory)
|
const contentFolder = path.join(cwd, argv.directory)
|
||||||
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
console.log(chalk.bgGreen.black(`\n Quartz v${version} \n`))
|
||||||
|
@ -300,7 +306,7 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
||||||
|
|
||||||
if (contentStat.isSymbolicLink()) {
|
if (contentStat.isSymbolicLink()) {
|
||||||
// put symlink back
|
// put symlink back
|
||||||
await popContentFolder()
|
await popContentFolder(contentFolder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue