diff --git a/packages/nx/src/command-line/migrate/command-object.ts b/packages/nx/src/command-line/migrate/command-object.ts index 9b033def1b24d..785771c516eec 100644 --- a/packages/nx/src/command-line/migrate/command-object.ts +++ b/packages/nx/src/command-line/migrate/command-object.ts @@ -155,8 +155,8 @@ function nxCliPath() { }); // if it's berry ensure we set the node_linker to node-modules if (packageManager === 'yarn' && pmc.ciInstall.includes('immutable')) { - execSync(pmc.preInstall, { - cwd: 'yarn config set nodeLinker node-modules', + execSync('yarn config set nodeLinker node-modules', { + cwd: tmpDir, stdio: ['ignore', 'ignore', 'ignore'], }); }