Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

typo. Report the success appropriately from piped subprocs

  • Loading branch information...
commit 38266d93b6d45e4f0e1332492a6b97d1cdf80d09 1 parent f0948d1
@isaacs isaacs authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/utils/exec.js
View
4 lib/utils/exec.js
@@ -37,14 +37,14 @@ function pipe (cp1, cp2, cb) {
cp2.stderr.on("data", logger)
}
cp1.on("exit", function (code) {
- if (!code) return log.verbose(cp2.name || "<unknown>", "success")
+ if (!code) return log.verbose(cp1.name || "<unknown>", "success")
cp2.kill()
cb(errState = new Error(
"Failed "+(cp1.name || "<unknown>")+"\nexited with "+code))
})
cp2.on("exit", function (code) {
if (errState) return
- if (!code) return log.verbose(cp1.name || "<unknown>", "success", cb)
+ if (!code) return log.verbose(cp2.name || "<unknown>", "success", cb)
cb(new Error( "Failed "+(cp2.name || "<unknown>")+"\nexited with "+code))
})
}

0 comments on commit 38266d9

Please sign in to comment.
Something went wrong with that request. Please try again.