Skip to content

Commit ca63976

Browse files
Gaëtan Faramazstephenlacy
authored andcommitted
Fix pull with callback only (#158)
1 parent aaac3c7 commit ca63976

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/pull.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ module.exports = function (remote, branch, opt, cb) {
1010
cb = opt;
1111
opt = {};
1212
}
13+
// pull with callback only
14+
if (!cb && typeof remote === 'function') {
15+
cb = remote;
16+
remote = {};
17+
}
1318
if (!cb || typeof cb !== 'function') cb = function () {};
1419
if (!opt) opt = {};
1520
if (!opt.cwd) opt.cwd = process.cwd();

0 commit comments

Comments
 (0)