child_process: restore exec{File}Sync error props#16060
Closed
targos wants to merge 2 commits intonodejs:masterfrom
Closed
child_process: restore exec{File}Sync error props#16060targos wants to merge 2 commits intonodejs:masterfrom
targos wants to merge 2 commits intonodejs:masterfrom
Conversation
bnoordhuis
reviewed
Oct 7, 2017
Member
There was a problem hiding this comment.
Suggestion:
const spawnSyncKeys = Object.keys(spawnSyncResult).sort();
assert.deepStrictEqual(spawnSyncKeys, [ /* ... */ ]);Right now you check that the corresponding properties exist on the error object but that won't catch regressions where the result of spawnSync() lacks some (or all) properties.
cjihrig
reviewed
Oct 7, 2017
lib/child_process.js
Outdated
Contributor
There was a problem hiding this comment.
Is this logic being lost by moving to Object.assign()?
Member
Author
There was a problem hiding this comment.
Yes but I don't think this logic should be there. It was also added in #13601.
The documentation says: "The Error object will contain the entire result from child_process.spawnSync()". If we want to translate the status, it should be done in spawnSync and execSync will inherit it.
3 tasks
In PR [1], a bunch of properties were removed from the error thrown by execSync and execFileSync. It turns out that some of those were still supposed to be there, as the documentation states that the error contains the entire result from the spawnSync call. [1] nodejs#13601
Member
Author
cjihrig
approved these changes
Oct 21, 2017
targos
added a commit
that referenced
this pull request
Oct 23, 2017
In PR [1], a bunch of properties were removed from the error thrown by execSync and execFileSync. It turns out that some of those were still supposed to be there, as the documentation states that the error contains the entire result from the spawnSync call. [1] #13601 PR-URL: #16060 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Member
Author
|
Landed in 556ebab |
addaleax
pushed a commit
to ayojs/ayo
that referenced
this pull request
Oct 26, 2017
In PR [1], a bunch of properties were removed from the error thrown by execSync and execFileSync. It turns out that some of those were still supposed to be there, as the documentation states that the error contains the entire result from the spawnSync call. [1] nodejs/node#13601 PR-URL: nodejs/node#16060 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax
pushed a commit
to ayojs/ayo
that referenced
this pull request
Dec 7, 2017
In PR [1], a bunch of properties were removed from the error thrown by execSync and execFileSync. It turns out that some of those were still supposed to be there, as the documentation states that the error contains the entire result from the spawnSync call. [1] nodejs/node#13601 PR-URL: nodejs/node#16060 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In PR [1], a bunch of properties were removed from the error thrown by
execSync and execFileSync. It turns out that some of those were still
supposed to be there, as the documentation states that the error
contains the entire result from the spawnSync call.
[1] #13601
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
child_process