-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
- Version: v8.0.0
- Platform: MacOS
- Subsystem: child_process
Wrapping child_process.exec
-s in util.promisify
returns a function that returns stdout and stderr in case there is no error (which is good), but does not return stdout and stderr in case of an error.
This means that if the command fails (with exit code != 0) then we have no access to the stdout and stderr (well, we can access stderr in a hackish way through exc.toString(), but that's hackish and still stdout can't be reached).
I suggest attaching stdout
and stderr
properties to the error returned by the rejected promise. If this is OK with everybody, I can fix it and create a pull request for this.
jkrems, motet-a, styfle and micchickenburger
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.