Skip to content

Commit

Permalink
Remove error message for older node versions
Browse files Browse the repository at this point in the history
As discussed with @timneutkens
  • Loading branch information
leo committed Apr 15, 2017
1 parent 2055271 commit 676ac01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 2 additions & 12 deletions bin/now.js
@@ -1,25 +1,15 @@
#!/usr/bin/env node

// Native
const path = require('path');
const { resolve } = require('path');

// Packages
const nodeVersion = require('node-version');
const updateNotifier = require('update-notifier');
const chalk = require('chalk');

// Ours
const errorHandlers = require('../lib/error');
const pkg = require('../lib/pkg');

// Throw an error if node version is too low
if (nodeVersion.major < 6) {
errorHandlers.error(
'Now requires at least version 6 of Node. Please upgrade!'
);
process.exit(1);
}

if (!process.pkg) {
const notifier = updateNotifier({ pkg });
const update = notifier.update;
Expand Down Expand Up @@ -100,7 +90,7 @@ if (cmd === 'help') {
cmd = 'deploy';
}

const bin = path.resolve(__dirname, 'now-' + cmd + '.js');
const bin = resolve(__dirname, 'now-' + cmd + '.js');

// Prepare process.argv for subcommand
process.argv = process.argv.slice(0, 2).concat(args);
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -74,7 +74,6 @@
"minimist": "1.2.0",
"ms": "1.0.0",
"node-fetch": "1.6.3",
"node-version": "1.0.0",
"opn": "4.0.2",
"ora": "1.2.0",
"progress": "2.0.0",
Expand Down

0 comments on commit 676ac01

Please sign in to comment.