Comparing version 2.0.1 to 2.1.0
@@ -6,2 +6,9 @@ # Change Log | ||
## [v2.1.0](https://github.com/JS-DevTools/ez-spawn/tree/v2.1.0) (2018-12-21) | ||
- If the process exits with a non-zero exit code, the error message now always includes the command, args, and exit code. If there was any stderr output, then that is appended to the error message as well. | ||
[Full Changelog](https://github.com/JS-DevTools/ez-spawn/compare/v2.0.0...v2.1.0) | ||
## [v2.0.0](https://github.com/JS-DevTools/ez-spawn/tree/v2.0.0) (2018-12-16) | ||
@@ -21,3 +28,2 @@ | ||
[Full Changelog](https://github.com/JS-DevTools/ez-spawn/compare/v1.0.0...v2.0.0) |
@@ -9,9 +9,9 @@ "use strict"; | ||
constructor (process) { | ||
let message = `${process.toString()} exited with a status of ${process.status}.`; | ||
if (process.stderr.length > 0) { | ||
super(process.stderr.toString().trim()); | ||
message += "\n\n" + process.stderr.toString().trim(); | ||
} | ||
else { | ||
super(`${process.toString()} exited with a status of ${process.status}.`); | ||
} | ||
super(message); | ||
Object.assign(this, process); | ||
@@ -18,0 +18,0 @@ this.name = ProcessError.name; |
{ | ||
"name": "ez-spawn", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Simple, consistent sync or async process spawning", | ||
@@ -42,3 +42,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/node": "^10.12.17", | ||
"@types/node": "^10.12.18", | ||
"chai": "^4.2.0", | ||
@@ -61,4 +61,4 @@ "coveralls": "^3.0.2", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=6" | ||
} | ||
} |
34971
535