Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Allow passing a callback on the settings object when push is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanramage committed Jul 30, 2013
1 parent 7f9c02e commit 64d527d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/commands/push.js
Expand Up @@ -82,7 +82,9 @@ exports.run = function (settings, args) {
exports.loadApp(dir, url, opt, settings,
function (err, url, cfg, doc) {
if (err) {
return logger.error(err);
logger.error(err);
if (settings.callback) settings.callback(err);
return;
}
var app_url = exports.getAppURL(url, cfg, doc);
var noauth_url = utils.noAuthURL(app_url);
Expand All @@ -93,10 +95,12 @@ exports.run = function (settings, args) {
return logger.error(err);
}
logger.end(noauth_url);
if (settings.callback) settings.callback();
});
}
else {
logger.end(noauth_url);
if (settings.callback) settings.callback();
}
}
);
Expand Down

0 comments on commit 64d527d

Please sign in to comment.