Skip to content

Commit

Permalink
fix(@angular/cli): ensure Node.js message is shown on old Node.js ver…
Browse files Browse the repository at this point in the history
…sions

(cherry picked from commit 1f16002)
  • Loading branch information
clydin authored and dgp1130 committed Apr 14, 2020
1 parent 5023051 commit a069073
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/angular/cli/bin/ng
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ try {
// tslint:disable-next-line: no-var-keyword
var version = process.versions.node.split('.').map(part => Number(part));
if (version[0] < 10 || version[0] === 11 || (version[0] === 10 && version[1] < 13)) {
process.stderr.write(
console.error(
'Node.js version ' + process.version + ' detected.\n' +
'The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.\n\n' +
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n'
);

process.exit(3);
process.exitCode = 3;
} else {
require('../lib/init');
}

require('../lib/init');

0 comments on commit a069073

Please sign in to comment.