diff --git a/facts/general/package.yml b/facts/general/package.yml index af90482..3353191 100644 --- a/facts/general/package.yml +++ b/facts/general/package.yml @@ -161,11 +161,11 @@ return 1 echo -e "\n" - echo "*** AUR (yay) ***" - if [[ $LOGNAME == "root" ]] then - su -P {{ user }} -c "yay -Syu {{ update_accept_var }}" || return 2 - else + if [[ "$LOGNAME" != "root" ]]; then + echo "*** AUR (yay) ***" yay -Syu {{ update_accept_var }} || return 2 + else + echo "*** User is root, skipping AUR (yay) ***" fi echo -e "\n" ;;