You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on jprichardson/node-fs-extra#619; and experimenting with switching our current implementation (an internal fork of mkdirp@0.x) to an internal fork of make-dir. In testing against our existing test suite, I discovered what seems to be a bug, and thought I'd report it upstream here.
The default mode is based on process.umask(), which is set here:
However, this is one static value, based on the process.umask() value at require-time. If the user sets the umask with process.umask(value) after requiring make-dir, the new umask will not be respected.
Fix for this would be to fetch defaults in a function, called at runtime, to get a fresh process.umask() call for every method call. Happy to submit a PR if this is confirmed as a bug.
The text was updated successfully, but these errors were encountered:
I'm working on jprichardson/node-fs-extra#619; and experimenting with switching our current implementation (an internal fork of
mkdirp@0.x
) to an internal fork ofmake-dir
. In testing against our existing test suite, I discovered what seems to be a bug, and thought I'd report it upstream here.The default
mode
is based onprocess.umask()
, which is set here:make-dir/index.js
Line 8 in 9de6474
However, this is one static value, based on the
process.umask()
value at require-time. If the user sets theumask
withprocess.umask(value)
after requiringmake-dir
, the newumask
will not be respected.Fix for this would be to fetch defaults in a function, called at runtime, to get a fresh
process.umask()
call for every method call. Happy to submit a PR if this is confirmed as a bug.The text was updated successfully, but these errors were encountered: