Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created October 28, 2020 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/b1ea5a0dd6a9565f929cfbfdc9eb3a48 to your computer and use it in GitHub Desktop.
Save isaacs/b1ea5a0dd6a9565f929cfbfdc9eb3a48 to your computer and use it in GitHub Desktop.
if (!isRoot) {
return promiseSpawnUid(cmd, args, {
...opts,
cwd,
uid: undefined,
gid: undefined,
}, extra)
}
const {uid, gid} = inferOwner.sync(cwd)
return promiseSpawnUid(cmd, args, {
...opts,
cwd,
uid,
gid,
}, extra)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment