From 93a9c88b18a2f052d9690acfc014c0c78311192c Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Tue, 6 Dec 2016 01:39:08 +0200 Subject: [PATCH] Break CLI process when Node is not supported As old versions of Node.js cannot be used anymore (after transpiling to ES6), we should break the process when such case happens. Use only var instead of let, const, as only var keyword is supported in Node.js 0.10.x --- bin/nativescript.js | 4 ++++ lib/common | 2 +- lib/nativescript-cli.ts | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/nativescript.js b/bin/nativescript.js index cc776ff51d..13ee743c65 100755 --- a/bin/nativescript.js +++ b/bin/nativescript.js @@ -1,4 +1,8 @@ #!/usr/bin/env node "use strict"; +var path = require("path"); +var node = require("../package.json").engines.node; +require(path.join(__dirname, "..", "lib", "common", "verify-node-version")).verifyNodeVersion(node, "NativeScript"); + require("../lib/nativescript-cli.js"); \ No newline at end of file diff --git a/lib/common b/lib/common index f6199c1aba..e4222d6734 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit f6199c1aba146f269251ef42f551d180869ddf9a +Subproject commit e4222d6734c0b550ebea0b3c43ba4336952c52c5 diff --git a/lib/nativescript-cli.ts b/lib/nativescript-cli.ts index 70f28a7f40..9dfe85b125 100644 --- a/lib/nativescript-cli.ts +++ b/lib/nativescript-cli.ts @@ -1,7 +1,3 @@ -let node = require("../package.json").engines.node; -// this call must be first to avoid requiring c++ dependencies -require("./common/verify-node-version").verifyNodeVersion(node, "NativeScript", "2.5.0"); - require("./bootstrap"); import * as fiber from "fibers"; import Future = require("fibers/future");