Skip to content

Commit

Permalink
Fix pull with callback only (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaëtan Faramaz authored and stephenlacy committed Apr 24, 2017
1 parent aaac3c7 commit ca63976
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ module.exports = function (remote, branch, opt, cb) {
cb = opt;
opt = {};
}
// pull with callback only
if (!cb && typeof remote === 'function') {
cb = remote;
remote = {};
}
if (!cb || typeof cb !== 'function') cb = function () {};
if (!opt) opt = {};
if (!opt.cwd) opt.cwd = process.cwd();
Expand Down

0 comments on commit ca63976

Please sign in to comment.