I use a program (
yay, in archlinux) which uses
sudo to elevate privileges. However, if it doesn't find
sudo, it will switch to
su, which is what I want it to do, since my user is not a sudoer, but I do have
sudo installed (because there's another program which needs
sudo to be installed even when run as root, I know it's silly).
Now the question is, how can I run this program (
yay), while making it think
sudo doesn't exist?
yay is a package manager (AUR helper) which also builds and installs packages from source, and you can't do those builds as root, for security reasons, which is fair enough.
Also note that I've already opened an issue here on
yay's repo, but while that's being fixed, I'd appreciate an alternative solution.