From 4f80b7378a4e6bd08bf74e51d35902aefec22e1a Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Mon, 22 Aug 2016 16:19:22 -0400 Subject: [PATCH] Bail out if not a valid version of node. Fixes gh-764 Sure, this is incredibly brutal, but the usb module DOESN'T WORK on Node.js > 4, so there is no point in being misleading. This is "fail hard, fail early" at its bluntest. Related to gh-828 Signed-off-by: Rick Waldron --- bin/tessel-2.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/tessel-2.js b/bin/tessel-2.js index 98b8d00a..34c54456 100755 --- a/bin/tessel-2.js +++ b/bin/tessel-2.js @@ -19,6 +19,11 @@ const CLI_ENTRYPOINT = 'cli.entrypoint'; // Check for updates const pkg = require('../package.json'); +if (parseInt(process.versions.node) > 5) { + log.error('Tessel 2 CLI (t2-cli) is supported for use with the Node.js 4.x.x LTS Release.'); + process.exit(); +} + /* * If a command has been run with root, * do not try to read the update-notifier config file.