From e7a35283678474b93364dac44da125bbf973aea0 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 6 May 2024 19:35:32 +0300 Subject: [PATCH] fix(create-medusa-app): don't open browser to admin if v2 option is passed (#7253) Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> --- .changeset/soft-elephants-switch.md | 5 +++++ packages/cli/create-medusa-app/src/commands/create.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/soft-elephants-switch.md diff --git a/.changeset/soft-elephants-switch.md b/.changeset/soft-elephants-switch.md new file mode 100644 index 0000000000..151a2c4810 --- /dev/null +++ b/.changeset/soft-elephants-switch.md @@ -0,0 +1,5 @@ +--- +"create-medusa-app": patch +--- + +fix(create-medusa-app): don't open browser to admin if v2 option is passed diff --git a/packages/cli/create-medusa-app/src/commands/create.ts b/packages/cli/create-medusa-app/src/commands/create.ts index 0660246a73..a3981ea8d3 100644 --- a/packages/cli/create-medusa-app/src/commands/create.ts +++ b/packages/cli/create-medusa-app/src/commands/create.ts @@ -256,13 +256,17 @@ export default async ({ await waitOn({ resources: ["http://localhost:9000/health"], - }).then(async () => + }).then(async () => { + if (v2) { + return + } + open( inviteToken ? `http://localhost:7001/invite?token=${inviteToken}&first_run=true` : "http://localhost:7001" ) - ) + }) } async function askForProjectName(directoryPath?: string): Promise {