diff --git a/updater.js b/updater.js index 5932fbb..570bae6 100644 --- a/updater.js +++ b/updater.js @@ -52,7 +52,7 @@ util.inherits(Updater, events.EventEmitter); Updater.prototype.getVersion = function(callback) { require('./util').doshell_promise("git describe --dirty=! --match='v*.*.*'", {cwd : __dirname, silent: true}) .then(function(data) { - parts = data.split('-'); + parts = data.split('-'); if(parts.length === 1) { var versionString = parts[0].trim(); } else { @@ -62,7 +62,6 @@ Updater.prototype.getVersion = function(callback) { callback(null, this.version); }.bind(this)) .catch(function(e) { - log.error(e); fs.readFile('version.json', 'utf8', function(err, data) { if(err) { return callback(null, this.version); diff --git a/util.js b/util.js index 30a30d0..f41c32b 100644 --- a/util.js +++ b/util.js @@ -37,7 +37,7 @@ function doshell(command, callback){ * If the command fails (nonzero error code) the promise rejects with all the stderr data from the process. */ function doshell_promise(command, options) { - deferred = Q.defer(); + var deferred = Q.defer(); options = options || {}; if(!options.silent) {