-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Add NODE_DEBUG info to child_process #721
Conversation
@@ -6,6 +6,7 @@ const net = require('net'); | |||
const dgram = require('dgram'); | |||
const assert = require('assert'); | |||
const util = require('util'); | |||
const debug = util.debuglog('child_process') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a semicolon
dfe56bd
to
a967948
Compare
@cjihrig All done! Rebased into a967948. |
@@ -1035,6 +1038,7 @@ function ChildProcess() { | |||
if (self.spawnfile) | |||
err.path = self.spawnfile; | |||
|
|||
err.spawnargs = self.spawnargs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the slice(1)
from below to this line so that it's only called when an error occurs.
@trevnorris what do you think? |
Fixes nodejsGH-720. Also adds the arguments passed to the Error object.
a967948
to
f7711fe
Compare
I'm cool with this. Except for the @cjihrig want to clean up the commit and land it, or shall I? |
I'll land it. |
Thanks! Landed in 9a8f186. I tweaked the commit message and moved the |
@cjihrig @trevnorris should this have landed with a test too? It doesn't look trivial enough to me to not include a new test to help prevent regressions. Reopening but please feel free to close if you have another perspective. |
@rvagg The change isn't going to break existing functionality, but we could add a test to make sure the correct values are being attached to the error object. |
I'll add the test for the error objects. |
Test landed in d53b636 |
Fixes GH-720. Also adds the arguments passed to the Error object.
Example: