Skip to content
Browse files

For both CLI meteor and the server, require up-to-date Node.

We allow Node versions later than the version in the dev bundle (which is the
version that is used for pre-release QA) but not earlier.
  • Loading branch information...
1 parent 89730bc commit cb464b7ee47be0d9b8426dce71859326643c1632 @glasser glasser committed
Showing with 18 additions and 0 deletions.
  1. +2 −0 admin/generate-dev-bundle.sh
  2. +8 −0 app/meteor/meteor.js
  3. +8 −0 app/server/server.js
View
2 admin/generate-dev-bundle.sh
@@ -55,6 +55,8 @@ cd build
git clone git://github.com/joyent/node.git
cd node
+# When upgrading node versions, also update the values of MIN_NODE_VERSION at
+# the top of app/meteor/meteor.js and app/server/server.js.
git checkout v0.8.11
./configure --prefix="$DIR"
View
8 app/meteor/meteor.js
@@ -4,6 +4,14 @@ var _ = require(path.join(__dirname, '..', 'lib', 'third', 'underscore.js'));
var deploy = require(path.join(__dirname, 'deploy'));
var fs = require("fs");
+// This code is duplicated in app/server/server.js.
+var MIN_NODE_VERSION = 'v0.8.11';
+if (require('semver').lt(process.version, MIN_NODE_VERSION)) {
+ process.stderr.write(
+ 'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n');
+ process.exit(1);
+}
+
var usage = function() {
process.stdout.write(
"Usage: meteor [--version] [--help] <command> [<args>]\n" +
View
8 app/server/server.js
@@ -16,6 +16,14 @@ var useragent = require('useragent');
// this file, server.js.
var _ = require(path.join(__dirname, 'underscore.js'));
+// This code is duplicated in app/server/server.js.
+var MIN_NODE_VERSION = 'v0.8.11';
+if (require('semver').lt(process.version, MIN_NODE_VERSION)) {
+ process.stderr.write(
+ 'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n');
+ process.exit(1);
+}
+
// Keepalives so that when the outer server dies unceremoniously and
// doesn't kill us, we quit ourselves. A little gross, but better than
// pidfiles.

0 comments on commit cb464b7

Please sign in to comment.
Something went wrong with that request. Please try again.