diff --git a/build/actions/update.js b/build/actions/update.js
index b04f0b53..1685e24c 100644
--- a/build/actions/update.js
+++ b/build/actions/update.js
@@ -36,7 +36,7 @@
         };
         command = "npm install --global " + packageJSON.name;
         return child_process.exec(command, function(error, stdout, stderr) {
-          if (error != null) {
+          if (error == null) {
             return onUpdate(null, stdout, stderr);
           }
           if (_.any([error.code === 3, error.code === 'EPERM', error.code === 'ACCES'])) {
diff --git a/lib/actions/update.coffee b/lib/actions/update.coffee
index 20d669b2..1ca7b5ee 100644
--- a/lib/actions/update.coffee
+++ b/lib/actions/update.coffee
@@ -41,7 +41,7 @@ exports.update =
 			# A safer thing to do is to call npm as a child process
 			# https://github.com/npm/npm/issues/7723
 			child_process.exec command, (error, stdout, stderr) ->
-				return onUpdate(null, stdout, stderr) if error?
+				return onUpdate(null, stdout, stderr) if not error?
 
 				if _.any [