'use strict' const BB = require('bluebird') module.exports = function (child, hasExitCode = false) { return BB.fromNode(function (cb) { child.on('error', cb) child.on(hasExitCode ? 'close' : 'end', function (exitCode) { if (exitCode === undefined || exitCode === 0) { cb() } else { let err = new Error('exited with error code: ' + exitCode) cb(err) } }) }) }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
cache-key.js | File | 129 B | 0644 |
|
finished.js | File | 419 B | 0644 |
|
git.js | File | 8.15 KB | 0644 |
|
opt-check.js | File | 1.21 KB | 0644 |
|
pack-dir.js | File | 1.03 KB | 0644 |
|
proclog.js | File | 340 B | 0644 |
|
read-json.js | File | 481 B | 0644 |
|