Skip to content

Commit c14e4d5

Browse files
=targos
=
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 PR-URL: #28219 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
1 parent 0856a4d commit c14e4d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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)