Skip to content

Commit

Permalink
Remove process.umask() call from config default
Browse files Browse the repository at this point in the history
Since we now are using pacote/tar in a way that will rely on the default
process umask setting, and we set file/directory modes explicitly
anyway, there's no need to have a default umask setting that calls
process.umask()

As this method is not worker-thread safe, and is deprecated, it's best
for us to stop using it.

Fix: #1103
  • Loading branch information
isaacs committed Jan 7, 2021
1 parent f9d3961 commit 30f95fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const defaults = {
'tag-version-prefix': 'v',
timing: false,
tmp: tmpdir(),
umask: process.umask ? process.umask() : 0o22,
umask: 0,
unicode,
'update-notifier': true,
usage: false,
Expand Down
6 changes: 3 additions & 3 deletions tap-snapshots/test-lib-utils-config.js-TAP.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Object {
"tag-version-prefix": "v",
"timing": false,
"tmp": "/tmp",
"umask": 18,
"umask": 0,
"unicode": true,
"update-notifier": true,
"usage": false,
Expand Down Expand Up @@ -658,7 +658,7 @@ Object {
"tag-version-prefix": "v",
"timing": false,
"tmp": "/tmp",
"umask": 22,
"umask": 0,
"unicode": true,
"update-notifier": true,
"usage": false,
Expand Down Expand Up @@ -1185,7 +1185,7 @@ Object {
"tag-version-prefix": "v",
"timing": false,
"tmp": "/tmp",
"umask": 22,
"umask": 0,
"unicode": true,
"update-notifier": true,
"usage": false,
Expand Down

0 comments on commit 30f95fc

Please sign in to comment.