helpers2.1: remove boring edge case in ynh_exec_as checking if asking to run as root..?

This commit is contained in:
Alexandre Aubin 2024-06-10 18:36:25 +02:00
parent 8ad3a3bc6f
commit a123149bef

View file

@ -180,10 +180,5 @@ ynh_system_user_delete() {
ynh_exec_as() {
local user=$1
shift 1
if [[ $user = $(whoami) ]]; then
eval "$@"
else
sudo -u "$user" "$@"
fi
sudo -u "$user" "$@"
}