From 087e8ce3ff16019a5bed26676ee94fd26cd3214a Mon Sep 17 00:00:00 2001 From: Steven Yung Date: Thu, 19 Oct 2023 16:04:32 +0200 Subject: [PATCH] fix(cli): prevent production install on add cmd --- packages/astro/src/cli/add/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index de27c368e0d88..42b16066577ef 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -700,7 +700,11 @@ async function tryToInstallIntegrations({ ...inheritedFlags, ...installCommand.dependencies, ], - { cwd } + { + cwd, + // reset NODE_ENV to ensure install command run in dev mode + env: { NODE_ENV: undefined }, + } ); spinner.succeed(); return UpdateResult.updated;