Skip to content

Commit

Permalink
🚸 Validate node version
Browse files Browse the repository at this point in the history
  • Loading branch information
bchatard committed Apr 18, 2019
1 parent ca5456e commit 61dd602
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
const alfy = require("alfy");

// check node version
const majorVersion = Number(process.version.replace("v", "").split(".")[0]);
if (majorVersion < 8) {
alfy.error(`Wrong Node version. We need v8+, you have ${process.version}`);
return;
}

const debug = require("./debug");
const fuseEngine = require("fuse.js");

Expand Down

0 comments on commit 61dd602

Please sign in to comment.