Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching stdout, stderr to error objects #82

Open
deployable opened this issue Feb 13, 2016 · 1 comment
Open

Attaching stdout, stderr to error objects #82

deployable opened this issue Feb 13, 2016 · 1 comment

Comments

@deployable
Copy link

The stdout and stderr that are returned from an exec error are lost during error handling. The error itself doesn't always include complete context of the problem.

It would be useful if they could be attached to the error object that is passed back to the callback.

attach_streams_to = ( obj, stdout, stderr )->
  obj.stdout = stdout
  obj.stderr = stderr
  obj

return attach_streams_to( err, stdout, stderr ) if err

I guess the next level is using spawn rather than exec and controlling streams and the error completely.

@notatestuser
Copy link
Owner

There's an effort to use child_process.spawn in #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants