Skip to content

Commit

Permalink
fix(@angular/cli): print full error when package is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Agius authored and Keen Yee Liau committed May 9, 2019
1 parent 31b6d49 commit ad45083
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/angular/cli/tasks/npm-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -35,7 +35,7 @@ export default async function (packageName: string,

default:
packageManager = 'npm';
installArgs.push('install', '--quiet');
installArgs.push('install');
break;
}

Expand All @@ -49,16 +49,16 @@ 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) => {
if (code === 0) {
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.');
}
});
});
Expand Down

0 comments on commit ad45083

Please sign in to comment.