Skip to content

Commit 047d7f0

Browse files
author
IceBuildUser
committed
Merge remote-tracking branch 'origin/release-appbuilder' into HEAD
2 parents 82716ac + b25275e commit 047d7f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

verify-node-version.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ import * as semver from "semver";
99
// We are absolutely sure we cannot work with them, so inform the user if he is trying to use any of them and exit the process.
1010
let versionsCausingFailure = ["0.10.34", "4.0.0", "4.2.0", "5.0.0"];
1111

12-
export function verifyNodeVersion(supportedVersionsRange: string): void {
12+
export function verifyNodeVersion(supportedVersionsRange: string, cliName: string, deprecationVersion: string): void {
1313
// The colors module should not be assigned to variable because the lint task will fail for not used variable.
1414
require("colors");
1515
let nodeVer = process.version.substr(1);
1616

1717
if (versionsCausingFailure.indexOf(nodeVer) !== -1) {
18-
console.error(`${EOL}Node.js '${nodeVer}' is not supported. To be able to work with this CLI, install any Node.js version in the following range: ${supportedVersionsRange}.${EOL}`.red.bold);
18+
console.error(`${EOL}Node.js '${nodeVer}' is not supported. To be able to work with ${cliName} CLI, install any Node.js version in the following range: ${supportedVersionsRange}.${EOL}`.red.bold);
1919
process.exit(1);
2020
}
2121

2222
if (semver.satisfies(nodeVer, "~0.10.0")) {
23-
console.warn(`${EOL}Support for Node.js 0.10.x is deprecated and it will be removed in the next release. Please upgrade to latest Node.js LTS version.${EOL}`.yellow.bold);
23+
console.warn(`${EOL}Support for Node.js 0.10.x is deprecated and will be removed in the ${cliName} ${deprecationVersion} release. Please, upgrade to the latest Node.js LTS version.${EOL}`.yellow.bold);
2424
} else {
2525
let checkSatisfied = semver.satisfies(nodeVer, supportedVersionsRange);
2626
if (!checkSatisfied) {

0 commit comments

Comments
 (0)