-
Notifications
You must be signed in to change notification settings - Fork 2.3k
core: use debug module for spawnResult error handling #4734
Conversation
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.
How can I test this?
@@ -272,7 +273,7 @@ class Console extends EventEmitter { | |||
// Theoretically stderr can contain multiple errors. | |||
// So let's just print it instead of throwing through | |||
// the error handling mechanism. Bad call? | |||
console.log(spawnResult.stderr.toString()); | |||
debug(spawnResult.stderr.toString()); |
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.
spawnSync returns status
, signal
and error
components in its return object. Do you think it's worth putting the debug behind a guard that checks iff there was an error? It might even be worth it to include those values when logging
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.
We would get more info this way, right? If that's the case I don't think we should.
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.
There could be more information, but it would only be presented if DEBUG environment is configured
For reference, the PR that implemented this logging in the first place is #3794. |
welp, I forgot about that. 🤔 |
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.
@eggplantzzz convinced me it's ok to merge this PR, leaving the ora investigation as follow-on work.
A quick change from console.log to debug module, as console logging the stderr was adding extra lines to the end of the migration output.