From dff0f0f8ddd531c5d92a90ac00fdb86d71f77509 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Thu, 17 Aug 2023 01:35:19 -0700 Subject: [PATCH] Detect Bun package manager in create-astro (#7944) Co-authored-by: Nate Moore --- .changeset/brown-wolves-tan.md | 5 +++++ packages/create-astro/src/actions/next-steps.ts | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/brown-wolves-tan.md diff --git a/.changeset/brown-wolves-tan.md b/.changeset/brown-wolves-tan.md new file mode 100644 index 000000000000..4f11f4534c89 --- /dev/null +++ b/.changeset/brown-wolves-tan.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +Update 'dev' command for Bun users diff --git a/packages/create-astro/src/actions/next-steps.ts b/packages/create-astro/src/actions/next-steps.ts index 1b3a0db286c4..01c1963d9826 100644 --- a/packages/create-astro/src/actions/next-steps.ts +++ b/packages/create-astro/src/actions/next-steps.ts @@ -5,7 +5,12 @@ import { nextSteps, say } from '../messages.js'; export async function next(ctx: Pick) { let projectDir = path.relative(process.cwd(), ctx.cwd); - const devCmd = ctx.pkgManager === 'npm' ? 'npm run dev' : `${ctx.pkgManager} dev`; + const devCmd = + ctx.pkgManager === 'npm' + ? 'npm run dev' + : ctx.pkgManager === 'bun' + ? 'bun run dev' + : `${ctx.pkgManager} dev`; await nextSteps({ projectDir, devCmd }); if (!ctx.skipHouston) {