Skip to content

Commit

Permalink
C3: Don't show cd instructions when the user is creating a project …
Browse files Browse the repository at this point in the history
…in the current directory (#4579)
  • Loading branch information
dario-piotrowicz authored Dec 8, 2023
1 parent 4c85fe9 commit cccd56b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-dots-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-cloudflare": patch
---

Don't show `cd` instructions when the user is creating a project in the current directory
9 changes: 5 additions & 4 deletions packages/create-cloudflare/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,12 @@ export const chooseAccount = async (ctx: PagesGeneratorContext) => {
};

export const printSummary = async (ctx: PagesGeneratorContext) => {
const dirRelativePath = relative(ctx.originalCWD, ctx.project.path);

const nextSteps = [
[
`Navigate to the new directory`,
`cd ${relative(ctx.originalCWD, ctx.project.path)}`,
],
...(dirRelativePath
? [`Navigate to the new directory`, `cd ${dirRelativePath}`]
: []),
[
`Run the development server`,
quoteShellArgs([
Expand Down

0 comments on commit cccd56b

Please sign in to comment.