fix: set COREPACK_ENABLE_STRICT=0 in runNpm (#7747)

* fix: set `COREPACK_ENABLE_STRICT=0` in `runNpm`

* docs: add changesets

* fix: compile

* Update exec/run-npm/src/index.ts

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
Antoine du Hamel
2024-03-08 12:16:57 +02:00
committed by GitHub
parent 7d2bde1083
commit e70a829047
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/run-npm": patch
"pnpm": patch
---
The npm CLI executed from pnpm should not use Corepack [#7747](https://github.com/pnpm/pnpm/pull/7747).

View File

@@ -14,7 +14,7 @@ export function runNpm (npmPath: string | undefined, args: string[], options?: R
cwd: options?.cwd ?? process.cwd(),
stdio: 'inherit',
userAgent: undefined,
env: options?.env ?? {},
env: { ...options?.env, COREPACK_ENABLE_STRICT: '0' },
})
}