Skip to content

Commit fbbc862

Browse files
=sam-github
=
authored andcommitted
test: use .code for error in setgid
When the 'nobody' user is missing use .code to detect this, its more robust than than the .message string. Refs: #19594
1 parent fc50e6b commit fbbc862

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-process-uid-gid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const oldgid = process.getgid();
7474
try {
7575
process.setgid('nobody');
7676
} catch (err) {
77-
if (err.message !== 'setgid group id does not exist') {
77+
if (err.code !== 'ERR_UNKNOWN_CREDENTIAL') {
7878
throw err;
7979
}
8080
process.setgid('nogroup');

0 commit comments

Comments
 (0)