diff --git a/packages/cli/src/commands/config/init.ts b/packages/cli/src/commands/config/init.ts index f497b99..6ba61c3 100644 --- a/packages/cli/src/commands/config/init.ts +++ b/packages/cli/src/commands/config/init.ts @@ -115,7 +115,8 @@ async function init(opts: { output?: string }) { { forgejoBaseUrl: () => p.text({ - message: "Forgejo API URL (how Myst reaches Forgejo, not your browser URL)?", + message: + "Forgejo API URL (how Myst reaches Forgejo, not your browser URL)?", placeholder: "http://forgejo:3000", validate: (v) => validateHttpUrlOrHost(v, "Forgejo base URL"), }), @@ -148,6 +149,7 @@ async function init(opts: { output?: string }) { if (envExists) { const tempPath = envPath + ".tmp"; + await fs.unlink(tempPath).catch(() => {}); await fs.writeFile(tempPath, envContent, { encoding: "utf8", flag: "wx",