Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix version checking for nodejs 0.10.0

Version checking should now be a bit more future proof.
Could possibly do with some error handling in case process.versions.node
goes away in future.
  • Loading branch information...
commit 07adb7dc59fdf3f2625072c7341396c23d575961 1 parent fe2eecd
@blutack blutack authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 tools/dependencies/launch_helper.js
View
7 tools/dependencies/launch_helper.js
@@ -10,10 +10,13 @@
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
////////////////////////////////////
-var min_node_version = 'v0.6.0';
+var min_node_version = '0.6.0';
-if (process.version < min_node_version) {
+if (flattenVersion(process.versions.node) < flattenVersion(min_node_version)) {
console.error('Your version of node seems to be too old. Please upgrade to a more recent version of node (>= '+min_node_version+')');
process.exit(1);
}
+function flattenVersion(version) {
+ return parseInt(version.replace(/\./g,''));
+}
Please sign in to comment.
Something went wrong with that request. Please try again.