fabric/fabric — Issue #503: Allow better control over sudo() exec environment
Author: bitprophet
Created: 2011-12-16 22:06:43+00:00
State: open

Two strongly connected use cases:

* User invokes `sudo` and expects it to preserve the invoking/connecting user's environment (e.g. `SSH_AUTH_SOCK` when tying it in with #72 and, say, trying to `sudo git clone`.)
* User invokes `sudo(xxx, user=foo)` and expects it to act with `foo`'s login environment.

While some sudoers configs will make this impossible, I believe the common defaults + additional `sudo` CLI flags may make this less painful for users.

We should either add some human-readable options to `sudo` for common flags, or allow custom flag control (and/or expose `env.sudo_prefix` to users, as seen in #432.)