Closed scotthovestadt closed 8 years ago
This issue is this block in command-instance.js
var res = fn.call(self.downstream, self.downstream.args, function () {
self.session.completeCommand();
});
It's assuming that the command will return a callback instead of a promise. In other places, both types are accounted for. The fix is pretty simple:
var onComplete = function () {
self.session.completeCommand();
};
var res = fn.call(self.downstream, self.downstream.args, onComplete);
if (res && res.then) {
res.then(onComplete, onComplete);
}
Good find. Would you mind throwing in a PR for that?
Done. If you wouldn't mind doing a release after you've verified, I would appreciate it.
Thanks! :+1:
Patch v1.3.27
published for you :)
Looks like it affects promises only. The first command resolves, subsequent piped commands promise doesn't seem to be seen as resolved.