diff options
author | liam4 <towerofnix@gmail.com> | 2017-05-31 19:32:36 -0300 |
---|---|---|
committer | liam4 <towerofnix@gmail.com> | 2017-05-31 19:32:36 -0300 |
commit | 4b1a544510f436fac951c8d161c4fbce44c42580 (patch) | |
tree | df7fc1716a892821202b123c52167a7168ecddbb /src/promisify-process.js | |
parent | 26663377fd7ea15a6c3d23a399d1266c8639d42e (diff) |
General improvements
Diffstat (limited to 'src/promisify-process.js')
-rw-r--r-- | src/promisify-process.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/promisify-process.js b/src/promisify-process.js index ca49b31..ef8d0c6 100644 --- a/src/promisify-process.js +++ b/src/promisify-process.js @@ -2,7 +2,8 @@ module.exports = function promisifyProcess(proc, showLogging = true) { // Takes a process (from child_process) and returns a promise that resolves - // when the process exits. + // when the process exits (or rejects with a warning, if the exit code is + // non-zero). return new Promise((resolve, reject) => { if (showLogging) { @@ -14,7 +15,7 @@ module.exports = function promisifyProcess(proc, showLogging = true) { if (code === 0) { resolve() } else { - console.error('Process failed!', proc.spawnargs) + console.error("Process failed!", proc.spawnargs) reject(code) } }) |