Skip to content

Commit

Permalink
fix(cli): prevent production install on add cmd (#8870)
Browse files Browse the repository at this point in the history
  • Loading branch information
xstevenyung authored Oct 20, 2023
1 parent c36d80a commit 5ea6ee0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/great-queens-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

prevent production install on astro add cmd
6 changes: 5 additions & 1 deletion packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ea6ee0

Please sign in to comment.