Skip to content

Commit

Permalink
Bail out if not a valid version of node. Fixes gh-764
Browse files Browse the repository at this point in the history
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 <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Aug 22, 2016
1 parent 81856a6 commit 94870ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/tessel-2.js
Expand Up @@ -19,6 +19,11 @@ const CLI_ENTRYPOINT = 'cli.entrypoint';
// Check for updates
const pkg = require('../package.json');

if (parseInt(process.versions.node) !== 4) {
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.
Expand Down

0 comments on commit 94870ea

Please sign in to comment.