From ac21f35b2ce544d1fb7e51d435785b3301529dc0 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 22 Jul 2024 13:09:33 +0300 Subject: [PATCH] fix(create-medusa-app): run links sync during setup (#8215) Run `links sync` command along with running migrations --- .github/workflows/test-cli-with-database.yml | 2 +- packages/cli/create-medusa-app/src/utils/prepare-project.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-cli-with-database.yml b/.github/workflows/test-cli-with-database.yml index 0cbeaa5049..c1763bddd8 100644 --- a/.github/workflows/test-cli-with-database.yml +++ b/.github/workflows/test-cli-with-database.yml @@ -60,7 +60,7 @@ jobs: working-directory: ../cli-test - name: Run migrations - run: medusa migrations run + run: medusa migrations run && medusa links sync working-directory: ../cli-test - name: Create admin user diff --git a/packages/cli/create-medusa-app/src/utils/prepare-project.ts b/packages/cli/create-medusa-app/src/utils/prepare-project.ts index 6e61b7d03e..d6e92684c2 100644 --- a/packages/cli/create-medusa-app/src/utils/prepare-project.ts +++ b/packages/cli/create-medusa-app/src/utils/prepare-project.ts @@ -138,7 +138,7 @@ export default async ({ await processManager.runProcess({ process: async () => { const proc = await execute( - ["npx medusa migrations run", npxOptions], + ["npx medusa migrations run && npx medusa links sync", npxOptions], { verbose, needOutput: true } )