-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: fix exec stdout & stderr default type in child_process #7361
Conversation
@@ -164,7 +164,7 @@ The `stdout` and `stderr` arguments passed to the callback will contain the | |||
stdout and stderr output of the child process. By default, Node.js will decode | |||
the output as UTF-8 and pass strings to the callback. The `encoding` option | |||
can be used to specify the character encoding used to decode the stdout and | |||
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to | |||
stderr output. If `encoding` is `'buffer'` (or not a valid Buffer encoding), `Buffer` objects will be passed to |
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.
I think this should say something like:
If
encoding
is'buffer'
, or an unrecognized character encoding,Buffer
objects will be passed to
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.
Also, please wrap lines at 80 characters.
@cjihrig I will edit these lines. |
@@ -164,8 +164,8 @@ The `stdout` and `stderr` arguments passed to the callback will contain the | |||
stdout and stderr output of the child process. By default, Node.js will decode | |||
the output as UTF-8 and pass strings to the callback. The `encoding` option | |||
can be used to specify the character encoding used to decode the stdout and | |||
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to | |||
the callback instead. | |||
stderr output. If `encoding` is `'buffer'`, or an unrecognized character encoding, |
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.
With a quick check, it seems like these lines are still > 80 characters.
@cjihrig Sorry for my poor English, here is my true meaning in Chinese 我在文档的前半部分看到一些行也超过了80字符, 如果我必须精确遵循80字符,请告诉我,我会修改的。 |
Please wrap them at 80 characters or less. There are some other longer lines, but they shouldn't be that way (no need to change the other ones in this PR though). |
@cjihrig Please review this new commit. |
LGTM |
Thanks! Landed in 926707f. |
Checklist
Affected core subsystem(s)
Description of change
add words in child_process docs about invalid Buffer encoding leading to a default buffer output