ahoward / systemu

univeral capture of stdout and stderr and handling of child process pid for windows, *nix, etc.
Other
126 stars 33 forks source link

specify a different user for a command #16

Closed ripienaar closed 12 years ago

ripienaar commented 12 years ago

It would be useful to be able to run the command as a different user/group:

status = systemu date, 'stdout' => stdout, 'stderr' => stderr, 'user' => 'foo', 'group' => 'foo'
damphyr commented 12 years ago

You're using nix semantics here. systemu's main purpose is to provide a cross-platform capabilities. I'm pretty sure that it's easier to wrap your command line on a nix (with a sudo -U prefix for example) than to hack systemu with an abstraction that will also serve Windows.

ripienaar commented 12 years ago

That's true, I did neglect to think about windows there.