Skip to content

Conversation

@dluxemburg
Copy link
Contributor

Currently the spawned git child processes all belong to the user/group of the parent process. This prevents using Simple Git on files owned by other uses without changing file ownership.

So, support a spawnOptions configuration option that passes through supported values (just uid and gid) to the child_process.spawn call that ultimately invokes git.

I made this work with a plugin modeled on the way custom config options get passed to the git command because that seemed like the most similar existing behavior. I am happy to switch this to the way environment variables work if that's more appropriate.

@dluxemburg dluxemburg changed the title Allow setting system user and group IDs for spawned processes Allow setting system user and group IDs for spawned processes (proposed) Jun 10, 2021
@steveukx steveukx merged commit b952ced into steveukx:main Jun 12, 2021
@steveukx
Copy link
Owner

Hi, thank you for opening the pull request.

This all looks good to me, I'll include it with the next release this weekend. You can follow #638 to see when it has been published to npm.

@dluxemburg
Copy link
Contributor Author

That's great! Thank you for making/maintaining this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants