We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e70a2b0 commit 49817f0Copy full SHA for 49817f0
packages/angular/cli/tasks/install-package.ts
@@ -58,20 +58,24 @@ export function installPackage(
58
}
59
60
61
- const { status } = spawnSync(
+ const { status, stderr } = spawnSync(
62
packageManager,
63
[
64
...installArgs,
65
...extraArgs,
66
],
67
{
68
- stdio: 'inherit',
69
- shell: true,
+ stdio: 'pipe',
+ encoding: 'utf8',
70
},
71
);
72
73
if (status !== 0) {
74
- throw new Error('Package install failed, see above.');
+ let errors = stderr.trim();
75
+ if (errors.length) {
76
+ errors += '\n';
77
+ }
78
+ throw new Error(errors + `Package install failed${errors.length ? ', see above' : ''}.`);
79
80
81
logger.info(colors.green(`Installed packages for tooling via ${packageManager}.`));
0 commit comments