Skip to content

Commit

Permalink
Remove unnecessary process.umask()
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 3, 2020
1 parent 4d59b81 commit 2d42170
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/opts-arg.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const { promisify } = require('util')
const fs = require('fs')
const optsArg = opts => {
if (!opts)
opts = { mode: 0o777 & (~process.umask()), fs }
opts = { mode: 0o777, fs }
else if (typeof opts === 'object')
opts = { mode: 0o777 & (~process.umask()), fs, ...opts }
opts = { mode: 0o777, fs, ...opts }
else if (typeof opts === 'number')
opts = { mode: opts, fs }
else if (typeof opts === 'string')
Expand Down
3 changes: 1 addition & 2 deletions test/opts-arg.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const t = require('tap')
const optsArg = require('../lib/opts-arg.js')
const umask = process.umask()
const mode = 0o777 & (~umask)
const mode = 0o777
const fs = require('fs')

const defFs = {
Expand Down

0 comments on commit 2d42170

Please sign in to comment.