diff --git a/ng-dev/release/publish/actions.ts b/ng-dev/release/publish/actions.ts index 91bf3713a..45919beaa 100644 --- a/ng-dev/release/publish/actions.ts +++ b/ng-dev/release/publish/actions.ts @@ -390,7 +390,7 @@ export abstract class ReleaseAction { /** Installs all Yarn dependencies in the current branch. */ protected async installDependenciesForCurrentBranch() { if (await this.pnpmVersioning.isUsingPnpm(this.projectDir)) { - await ExternalCommands.invokePnpmInstall(this.projectDir, this.pnpmVersioning); + await ExternalCommands.invokePnpmInstall(this.projectDir); return; } diff --git a/ng-dev/release/publish/external-commands.ts b/ng-dev/release/publish/external-commands.ts index 58ab8ec36..33e09253d 100644 --- a/ng-dev/release/publish/external-commands.ts +++ b/ng-dev/release/publish/external-commands.ts @@ -239,15 +239,21 @@ export abstract class ExternalCommands { * Invokes the `pnpm install` command in order to install dependencies for * the configured project with the currently checked out revision. */ - static async invokePnpmInstall( - projectDir: string, - pnpmVersioning: PnpmVersioning, - ): Promise { + static async invokePnpmInstall(projectDir: string): Promise { try { - const pnpmSpec = await pnpmVersioning.getPackageSpec(projectDir); - await ChildProcess.spawn('npx', ['--yes', pnpmSpec, 'install', '--frozen-lockfile'], { - cwd: projectDir, - }); + await ChildProcess.spawn( + 'pnpm', + [ + 'install', + '--frozen-lockfile', + // PNPM does not have no interactive, + // See: https://github.com/pnpm/pnpm/issues/6778 + '--config.confirmModulesPurge=false', + ], + { + cwd: projectDir, + }, + ); Log.info(green(' ✓ Installed project dependencies.')); } catch (e) {