fix(repo): fix running e2e tests locally with npm 7 (#6400)

This commit is contained in:
Jason Jean 2021-07-16 18:04:09 -04:00 committed by GitHub
parent 7de111c25b
commit 90921aabf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -610,9 +610,13 @@ export function getPackageManagerCommand({
const publishedVersion = `9999.0.2`;
const [npmMajorVersion] = execSync(`npm -v`).toString().split('.');
return {
npm: {
createWorkspace: `npx create-nx-workspace@${publishedVersion}`,
createWorkspace: `npx ${
+npmMajorVersion >= 7 ? '--yes' : ''
} create-nx-workspace@${publishedVersion}`,
runNx: `npm run nx${scriptsPrependNodePathFlag} --`,
runNxSilent: `npm run nx --silent${scriptsPrependNodePathFlag} --`,
addDev: `npm install --legacy-peer-deps -D`,