Skip to content

Commit

Permalink
Deferred bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansturmer committed Nov 8, 2016
1 parent 070fc49 commit 91bb144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 91bb144

Please sign in to comment.