Comparing version 1.2.12 to 1.2.13
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/microlinkhq/tinyspawn", | ||
"version": "1.2.12", | ||
"version": "1.2.13", | ||
"main": "src/index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -40,3 +40,3 @@ 'use strict' | ||
childProcess.on('error', reject).on('exit', code => { | ||
childProcess.on('error', reject).on('exit', exitCode => { | ||
Object.defineProperty(childProcess, 'stdout', { | ||
@@ -46,7 +46,7 @@ get: parse(stdout, opts) | ||
Object.defineProperty(childProcess, 'stderr', { get: parse(stderr) }) | ||
if (code === 0) return resolve(childProcess) | ||
if (exitCode === 0) return resolve(childProcess) | ||
const command = `${cmd} ${cmdArgs.join(' ')}` | ||
let message = `The command spawned as:${EOL}${EOL}` | ||
message += ` ${command}${EOL}${EOL}` | ||
message += `exited with \`{ code: ${code} }\` and the following trace:${EOL}${EOL}` | ||
message += `exited with \`{ code: ${exitCode} }\` and the following trace:${EOL}${EOL}` | ||
message += String(stderr) | ||
@@ -53,0 +53,0 @@ .split(EOL) |
11771