Skip to content

Commit 90921aa

Browse files
authored
fix(repo): fix running e2e tests locally with npm 7 (#6400)
1 parent 7de111c commit 90921aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

e2e/utils/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,13 @@ export function getPackageManagerCommand({
610610

611611
const publishedVersion = `9999.0.2`;
612612

613+
const [npmMajorVersion] = execSync(`npm -v`).toString().split('.');
614+
613615
return {
614616
npm: {
615-
createWorkspace: `npx create-nx-workspace@${publishedVersion}`,
617+
createWorkspace: `npx ${
618+
+npmMajorVersion >= 7 ? '--yes' : ''
619+
} create-nx-workspace@${publishedVersion}`,
616620
runNx: `npm run nx${scriptsPrependNodePathFlag} --`,
617621
runNxSilent: `npm run nx --silent${scriptsPrependNodePathFlag} --`,
618622
addDev: `npm install --legacy-peer-deps -D`,

0 commit comments

Comments
 (0)