Skip to content

Commit

Permalink
Don't use deprecated process.umask() (#791)
Browse files Browse the repository at this point in the history
* Don't use deprecated process.umask()

Refs sindresorhus/make-dir#27

* Remove unneeded umask tests

No need to test Node.js core's behavior (which is all these tests do)
  • Loading branch information
RyanZim authored Apr 24, 2020
1 parent 934ea75 commit a2738d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 82 deletions.
80 changes: 0 additions & 80 deletions lib/mkdirs/__tests__/umask.test.js

This file was deleted.

3 changes: 1 addition & 2 deletions lib/mkdirs/make-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ const checkPath = pth => {
}

const processOptions = options => {
// Must be defined here so we get fresh process.umask()
const defaults = { mode: 0o777 & (~process.umask()) }
const defaults = { mode: 0o777 }
if (typeof options === 'number') options = { mode: options }
return { ...defaults, ...options }
}
Expand Down

0 comments on commit a2738d3

Please sign in to comment.