This is exactly it.  Specifying env.sudo_prefix allowed sudo to be found in
/usr/local/bin.

Thanks for your help!


On Wed, Mar 6, 2013 at 2:21 PM, Ronan Amicel <[email protected]> wrote:

>
> On Wed, Mar 6, 2013 at 7:58 PM, Justin Palmer <[email protected]>wrote:
>
>> Trying a simple test fabfile to run a sudo command on Solaris.  Gives the
>> results below.  The sudo path is set via .profile which I assume would be
>> read with shell=True.  What am I missing?
>
>
>
> When you use run(cmd, shell=True), fabric will execute the command within
> a shell.
>
> When you use sudo(cmd, shell=True), fabric will use sudo to run this
> shell, but the sudo call itself will not  happen within a shell context, so
> your .profile is not executed, and /usr/local/bin in not in the PATH.
>
> Try adding this at the beginning of your fabfile (after imports):
>
> env.sudo_prefix = "/usr/local/bin/sudo -S -p '%(sudo_prompt)s' "
>
> Hope this helps.
>
> --
> Ronan Amicel
>
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to