Skip to content

Commit

Permalink
fix(@angular/cli): ensure odd number Node.js version message is a war…
Browse files Browse the repository at this point in the history
…ning

Fixes: #20050
  • Loading branch information
clydin authored and filipesilva committed Feb 15, 2021
1 parent 1f83f30 commit b179a70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/angular/cli/bin/ng
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ if (version[0] % 2 === 1 && version[0] > 14) {
'Odd numbered Node.js versions will not enter LTS status and should not be used for production.' +
' For more information, please see https://nodejs.org/en/about/releases/.',
);

require('../lib/init');
} else if (
version[0] < 12 ||
version[0] === 13 ||
(version[0] === 12 && version[1] < 13) ||
(version[0] === 14 && version[1] < 15)
) {
// Error and exit if less than 12.13 or 13.x or less than 14.15
console.error(
'Node.js version ' +
process.version +
Expand Down

0 comments on commit b179a70

Please sign in to comment.