Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix for setting the exit index properly

  • Loading branch information...
commit b7bcfcd400255486d79829ee16f3b90a283cc3af 1 parent 2961ef8
@substack authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.js
View
4 index.js
@@ -418,12 +418,12 @@ Bash.prototype.eval = function (line) {
else if (op === '&') {
var index = self._jobIndex();
self.jobs[index] = cmd;
- (function (cmd) {
+ (function (cmd, index) {
cmd.on('end', function () {
delete self.jobs[index];
self.emit('done', index, cmd);
});
- })(cmd);
+ })(cmd, index);
self.emit('detach', cmd);
if (commands.length) {
cmd = shiftCommand();
Please sign in to comment.
Something went wrong with that request. Please try again.