env.sudo_prefix works to specify which sudo is being called, which is an uncommon but not entirely rare need for users whose default $PATH does not include it.
However, it's not documented, and probably should be.
(Was: "Allow override of which sudo binary is used".)
Thanks for working this, sorry for being an oddball...
The error I was seeing was:
out: bash: sudo: command not found
Fatal error: sudo() received nonzero return code 127 while executing!
Requested: /bin/mv /tmp/yum.conf /etc/yum.conf
Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "/bin/mv /tmp/yum.conf /etc/yum.conf"
Looks like I can modify this with env['sudo_prefix']. That's totally workable for me, so feel free to close this issue. Thanks again for your help thinking about this!
Yup, I'd forgotten about sudo_prefix and it works just fine to solve this issue. Thanks for sharing your resolution :)
That said, it appears to be undocumented and I cannot think of a good reason for this, so this issue is now about documenting it.
Clean up & document env.sudo_prefix.
Fixes #609, fixes #564