-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: child_process.SpawnSync output, stdout, stderr can be null #33458
Labels
doc
Issues and PRs related to the documentations.
Comments
jasnell
added a commit
to jasnell/node
that referenced
this issue
Jan 4, 2021
The various `subprocess.stdwhatever` properties can be null or undefined in certain conditions. Fixes: nodejs#33458 Signed-off-by: James M Snell <[email protected]>
danielleadams
pushed a commit
that referenced
this issue
Jan 12, 2021
The various `subprocess.stdwhatever` properties can be null or undefined in certain conditions. Fixes: #33458 Signed-off-by: James M Snell <[email protected]> PR-URL: #36784 Reviewed-By: Luigi Pinca <[email protected]>
targos
pushed a commit
that referenced
this issue
May 1, 2021
The various `subprocess.stdwhatever` properties can be null or undefined in certain conditions. Fixes: #33458 Signed-off-by: James M Snell <[email protected]> PR-URL: #36784 Reviewed-By: Luigi Pinca <[email protected]>
This is still a problem for me in 16.2, installed via nvm in MacOS Big Sur. spawnSync with no options successfully catches stdout and stderr. spawnSync with a single option, e.g. |
I am also seeing this issue with 16.14. My |
0x2b3bfa0
added a commit
to iterative/cml
that referenced
this issue
Jan 4, 2023
0x2b3bfa0
added a commit
to iterative/cml
that referenced
this issue
Jan 17, 2023
* Output a meaningful message if `git` is not available Related to nodejs/node#33458 * Lint * Lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📗 API Reference Docs Problem
Location
Section of the site where the content exists
Affected URL(s):
Problem description
Concise explanation of what you found to be problematic
In the "Returns" desciption it states that "stdout" and "stderr" can be
<Buffer>
or<string>
and that "output" is of type<Array>
.However, this is not the case when the spawned process terminates with an error.
To reproduce you can run the following script:
will output:
As you can see "stdout", "stderr" and "output" are
null
.I'm not sure if this is a bug in the implementation or if this is the desired behavior. In the latter case it should be stated in the docs that these three fields can also be null and under which conditions this is the case.
The text was updated successfully, but these errors were encountered: