Skip to content

Commit a069073

Browse files
clydindgp1130
authored andcommittedApr 14, 2020
fix(@angular/cli): ensure Node.js message is shown on old Node.js versions
(cherry picked from commit 1f16002)
1 parent 5023051 commit a069073

File tree

1 file changed

+5
-5
lines changed
  • packages/angular/cli/bin

1 file changed

+5
-5
lines changed
 

‎packages/angular/cli/bin/ng

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ try {
1616
// tslint:disable-next-line: no-var-keyword
1717
var version = process.versions.node.split('.').map(part => Number(part));
1818
if (version[0] < 10 || version[0] === 11 || (version[0] === 10 && version[1] < 13)) {
19-
process.stderr.write(
19+
console.error(
2020
'Node.js version ' + process.version + ' detected.\n' +
2121
'The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.\n\n' +
22-
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
22+
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n'
2323
);
2424

25-
process.exit(3);
25+
process.exitCode = 3;
26+
} else {
27+
require('../lib/init');
2628
}
27-
28-
require('../lib/init');

0 commit comments

Comments
 (0)
Please sign in to comment.