Permalink
Browse files

Fix version checking (Issue #328)

	modified:   lib/bindings.js
  • Loading branch information...
1 parent 839dd3d commit 9677444ef28d4590b259730e90864db412531988 @cGuille committed Mar 23, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/bindings.js
View
@@ -3,10 +3,10 @@ var path = require('path'),
var platform = process.platform,
arch = process.arch,
- version = parseFloat(process.version.slice(1));
+ versionValues = process.version.substr(1).split('.').map(function (item) { return parseInt(item, 10); });
-if (version < 0.8) {
- throw new Error("AppJS requires Node.js v0.8");
+if (versionValues[0] === 0 && versionValues[1] < 8) {
+ throw new Error("AppJS requires Node.js v0.8");
@Rob--W
Rob--W Apr 2, 2013

The rest of the code uses two spaces for each level of indention. Could you edit your commit to be consistent?

}
if (platform == 'darwin' && arch === 'x64') {

1 comment on commit 9677444

@cGuille
Owner
cGuille commented on 9677444 Apr 2, 2013

Oh yeah sure, I'll do that quickly.
Sorry I didn't payed attention about this (this is the first time I contribute to a third party project).

It has been done. I did:

git commit --amend
git push -f

So the pull request should take the change into consideration.
Is it the right way?

Please sign in to comment.