Why not to check if pamac is called with sudo?

I’ve just solved a problem that originated from the fact that I was calling pamac install with sudo.
For me was innatural to understand that the proper way to call pamac is without sudo. This is correctly reported in the documentation but then, why not to do a step further to help the users and check it and give a warning or even better an error?

only for aur :wink: and by default aur is disabled

What exactly was the command ?


Warning Never use sudo with pamac. It will ask for escalated rights if it needs them

For me, this phrase is not good, too simple, it would be :
we can use sudo only for special cases, if in doubt, don’t use sudo

Personally I think that the wiki quote is good, and infact is covering both AUR and “standard” usage, I would just align the executable program to this expected user behaviour!

Yes pamac can be called with or without sudo but the recommended way is indeed without.
Anyway that should not make a difference except for building packages from AUR.

Maybe if it creates issues for building AUR package, a safeguard could be implemented to refuse to run with sudo in that case? That’s a good improvement in my opinion.

Indeed. makepkg cannot be run as root.