Skip to content

Stop using process.umask() #22

@bnoordhuis

Description

@bnoordhuis

Refs: nodejs/node#32321

Summary: process.umask() (no args) will be deprecated and removed.

Reviewing this module, it uses process.umask() in roughly this pattern:

const mode = 0o777 & ~process.umask();
fs.mkdirSync(dir, mode);

Computing the file mode that way is superfluous because the operating system applies the umask anyway. It can be replaced with just this:

fs.mkdirSync(dir, 0o777);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions