-
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: add an example code #35625
doc: add an example code #35625
Conversation
doc/api/process.md
Outdated
@@ -1342,6 +1342,12 @@ The `process.getgroups()` method returns an array with the supplementary group | |||
IDs. POSIX leaves it unspecified if the effective group ID is included but | |||
Node.js ensures it always is. | |||
|
|||
```js | |||
if (process.getgroups) { | |||
console.log(`Current groups: ${process.getgroups()}`); |
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.
console.log(`Current groups: ${process.getgroups()}`); | |
console.log(process.getgroups()); // [ 16, 21, 297 ] |
Embedding it in a string might make it less clear what the output is in this case. Raw array output might be better.
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.
@Trott - I understand your point and thanks for the review. I have followed your suggestion. Please have a look.
PR-URL: nodejs#35625 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
78cb167
to
f59d4e0
Compare
Landed in f59d4e0 @PoojaDurgad I usually don't bother contributors with this detail, but because you are opening a lot of pull requests: Usually, only the first commit needs to be formatted according to our guidelines. For subsequent commits that are small changes to your pull requests (such as in this one where you had a second commit that removed extraneous whitespace and a third commit that implemented a small suggestion from a reviewer), it helps if you use |
@Trott - Thanks for the suggestion. I will follow up. |
PR-URL: #35625 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#35625 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes