Skip to content

Commit

Permalink
Core: Do not add packageManager field to package.json during storyboo…
Browse files Browse the repository at this point in the history
…k dev
  • Loading branch information
valentinpalkovic committed Sep 19, 2024
1 parent 57cdf15 commit a49cfdc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions code/core/src/common/js-package-manager/JsPackageManagerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,24 @@ export class JsPackageManagerFactory {
}

function hasNPM(cwd?: string) {
const npmVersionCommand = spawnSync('npm', ['--version'], { cwd, shell: true });
const npmVersionCommand = spawnSync('npm', ['--version'], {
cwd,
shell: true,
env: {
COREPACK_ENABLE_STRICT: '0',
},
});
return npmVersionCommand.status === 0;
}

function hasPNPM(cwd?: string) {
const pnpmVersionCommand = spawnSync('pnpm', ['--version'], { cwd, shell: true });
const pnpmVersionCommand = spawnSync('pnpm', ['--version'], {
cwd,
shell: true,
env: {
COREPACK_ENABLE_STRICT: '0',
},
});
return pnpmVersionCommand.status === 0;
}

Expand Down

0 comments on commit a49cfdc

Please sign in to comment.