mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
process: allow reading umask in workers
Refs: https://github.com/nodejs/node/issues/25448 PR-URL: https://github.com/nodejs/node/pull/25526 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
10 files changed
+54
-12
No files matched your search
@@ -23,7 +23,7 @@
|
||||
const common = require('../common');
|
||||
|
||||
if (!common.isMainThread)
|
||||
common.skip('process.umask is not available in Workers');
|
||||
common.skip('Setting process.umask is not supported in Workers');
|
||||
|
||||
const assert = require('assert');
|
||||
const path = require('path');
|
||||
|
||||
@@ -7,7 +7,7 @@ const common = require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
if (!common.isMainThread)
|
||||
common.skip('process.umask is not available in Workers');
|
||||
common.skip('Setting process.umask is not supported in Workers');
|
||||
|
||||
let mask;
|
||||
|
||||
|
||||
@@ -22,8 +22,15 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
if (!common.isMainThread)
|
||||
common.skip('process.umask is not available in Workers');
|
||||
|
||||
if (!common.isMainThread) {
|
||||
assert.strictEqual(typeof process.umask(), 'number');
|
||||
assert.throws(() => {
|
||||
process.umask('0664');
|
||||
}, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' });
|
||||
|
||||
common.skip('Setting process.umask is not supported in Workers');
|
||||
}
|
||||
|
||||
// Note in Windows one can only set the "user" bits.
|
||||
let mask;
|
||||
|
||||
Reference in new issue
Block a user