MCPcopy Create free account
hub / github.com/angular/dev-infra / invokePnpmInstall

Function invokePnpmInstall

ng-dev/release/publish/external-commands.ts:330–353  ·  view source on GitHub ↗

* Invokes the `pnpm install` command in order to install dependencies for * the configured project with the currently checked out revision.

(projectDir: string)

Source from the content-addressed store, hash-verified

328 * the configured project with the currently checked out revision.
329 */
330 static async invokePnpmInstall(projectDir: string): Promise<void> {
331 try {
332 await ChildProcess.spawn(
333 'pnpm',
334 [
335 'install',
336 '--frozen-lockfile',
337 '--ignore-scripts',
338 // PNPM does not have no interactive,
339 // See: https://github.com/pnpm/pnpm/issues/6778
340 '--config.confirmModulesPurge=false',
341 ],
342 {
343 cwd: projectDir,
344 mode: 'on-error',
345 },
346 );
347
348 Log.info(green(' ✓ Installed project dependencies.'));
349 } catch (e) {
350 Log.error(e);
351 Log.error(' ✘ An error occurred while installing dependencies.');
352 throw new FatalReleaseActionError();
353 }
354 }
355
356 private static async _spawnNpmScript(

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected