diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 57a0f9296a46d9..4f8089ccc72a40 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -223,8 +223,9 @@ the existing process and uses a shell to execute the command. If this method is invoked as its [`util.promisify()`][]ed version, it returns a Promise for an object with `stdout` and `stderr` properties. In case of an -error, a rejected promise is returned, with the same `error` object given in the -callback, but with an additional two properties `stdout` and `stderr`. +error (including any error resulting in an exit code other than 0), a rejected +promise is returned, with the same `error` object given in the callback, but +with an additional two properties `stdout` and `stderr`. ```js const util = require('util'); @@ -301,7 +302,8 @@ encoding, `Buffer` objects will be passed to the callback instead. If this method is invoked as its [`util.promisify()`][]ed version, it returns a Promise for an object with `stdout` and `stderr` properties. In case of an -error, a rejected promise is returned, with the same `error` object given in the +error (including any error resulting in an exit code other than 0), a rejected +promise is returned, with the same `error` object given in the callback, but with an additional two properties `stdout` and `stderr`. ```js