diff --git a/e2e/utils/index.ts b/e2e/utils/index.ts index 95622d4b8d..09bfb0d63f 100644 --- a/e2e/utils/index.ts +++ b/e2e/utils/index.ts @@ -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`,