From ad45083c491bd1303202e4c4324c51a2e58b732b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 9 May 2019 15:05:47 +0300 Subject: [PATCH] fix(@angular/cli): print full error when package is not found --- packages/angular/cli/tasks/npm-install.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular/cli/tasks/npm-install.ts b/packages/angular/cli/tasks/npm-install.ts index 99a470b8d902..b14df7b5481a 100644 --- a/packages/angular/cli/tasks/npm-install.ts +++ b/packages/angular/cli/tasks/npm-install.ts @@ -26,7 +26,7 @@ export default async function (packageName: string, case 'cnpm': case 'pnpm': case 'npm': - installArgs.push('install', '--silent'); + installArgs.push('install'); break; case 'yarn': @@ -35,7 +35,7 @@ export default async function (packageName: string, default: packageManager = 'npm'; - installArgs.push('install', '--quiet'); + installArgs.push('install'); break; } @@ -49,6 +49,8 @@ export default async function (packageName: string, installArgs.push('--no-save'); } + installArgs.push('--quiet'); + await new Promise((resolve, reject) => { spawn(packageManager, installArgs, { stdio: 'inherit', shell: true }) .on('close', (code: number) => { @@ -56,9 +58,7 @@ export default async function (packageName: string, logger.info(terminal.green(`Installed packages for tooling via ${packageManager}.`)); resolve(); } else { - const message = 'Package install failed, see above.'; - logger.info(terminal.red(message)); - reject(message); + reject('Package install failed, see above.'); } }); });