diff --git a/.changeset/quick-cheetahs-attack.md b/.changeset/quick-cheetahs-attack.md new file mode 100644 index 0000000000..9271f90dd5 --- /dev/null +++ b/.changeset/quick-cheetahs-attack.md @@ -0,0 +1,5 @@ +--- +"create-cloudflare": patch +--- + +fix: make sure that using the current directory doesn't generate an `undefined undefined` log in the output summary. diff --git a/packages/create-cloudflare/src/summary.ts b/packages/create-cloudflare/src/summary.ts index a2379cf602..6d2ff1c694 100644 --- a/packages/create-cloudflare/src/summary.ts +++ b/packages/create-cloudflare/src/summary.ts @@ -12,9 +12,9 @@ export const printSummary = async (ctx: C3Context) => { const dirRelativePath = relative(ctx.originalCWD, ctx.project.path); const nextSteps = [ - dirRelativePath - ? ["Navigate to the new directory", `cd ${dirRelativePath}`] - : [], + ...(dirRelativePath + ? [["Navigate to the new directory", `cd ${dirRelativePath}`]] + : []), [ "Run the development server", quoteShellArgs([npm, "run", ctx.template.devScript ?? "start"]),