Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #115 from blutack/patch-1

[contrib] launch_helper: Fix version checking for nodejs 0.10.0
  • Loading branch information...
commit 7b4a07ef46edb91c63f9c6e0324c7ebe8a73c72f 2 parents fe2eecd + 07adb7d
@Aqua-Ye Aqua-Ye authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 tools/dependencies/launch_helper.js
View
7 tools/dependencies/launch_helper.js
@@ -10,10 +10,13 @@
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
////////////////////////////////////
-var min_node_version = 'v0.6.0';
+var min_node_version = '0.6.0';
-if (process.version < min_node_version) {
+if (flattenVersion(process.versions.node) < flattenVersion(min_node_version)) {
console.error('Your version of node seems to be too old. Please upgrade to a more recent version of node (>= '+min_node_version+')');
process.exit(1);
}
+function flattenVersion(version) {
+ return parseInt(version.replace(/\./g,''));
+}
Please sign in to comment.
Something went wrong with that request. Please try again.