diff --git a/quartz/cli/handlers.js b/quartz/cli/handlers.js index 586881af9..37762a4fb 100644 --- a/quartz/cli/handlers.js +++ b/quartz/cli/handlers.js @@ -113,7 +113,10 @@ export async function handleCreate(argv) { } } - 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