mkdirp-infer-owner

mkdirp, but chown to the owner of the containing folder if possible and necessary

ISC 4 个版本
安装
npm install mkdirp-infer-owner
yarn add mkdirp-infer-owner
pnpm add mkdirp-infer-owner
bun add mkdirp-infer-owner
README

mkdirp-infer-owner

mkdirp, but chown to the owner of the containing folder if possible and necessary.

That is, on Windows and when running as non-root, it's exactly the same as mkdirp.

When running as root on non-Windows systems, it uses infer-owner to find the owner of the containing folder, and then chownr to set the ownership of the created folder to that same uid/gid.

This is used by npm to prevent root-owned files and folders from showing up in your home directory (either in node_modules or in the ~/.npm cache) when running as root.

版本列表
2.0.0 2020-07-11
1.0.2 2020-01-26
1.0.1 2020-01-25
1.0.0 2020-01-25