Skip to content

Commit

Permalink
Update start.js
Browse files Browse the repository at this point in the history
Check the minor version number only when the major is 7, otherwise you might get a false negative (e.g. node version v6.9.4).
  • Loading branch information
camjm authored May 21, 2017
1 parent 57fc8a9 commit 8f58db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starter-files/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const mongoose = require('mongoose');

// Make sure we are running node 7.6+
const [major, minor] = process.versions.node.split('.').map(parseFloat);
if (major <= 7 && minor <= 5) {
if (major < 7 || (major = 7 && minor <= 5)) {
console.log('🛑 🌮 🐶 💪 💩\nHey You! \n\t ya you! \n\t\tBuster! \n\tYou\'re on an older version of node that doesn\'t support the latest and greatest things we are learning (Async + Await)! Please go to nodejs.org and download version 7.6 or greater. 👌\n ');
process.exit();
}
Expand Down

0 comments on commit 8f58db6

Please sign in to comment.