Fixed crash bug if yad is not installed and agm is launched from a gui. Insure AGM is not ran as the root users. If people who really should know better still need training wheels, actual newbies might need the protection as well.

This commit is contained in:
Storm Dragon
2025-11-08 13:07:07 -05:00
parent e8b0b97ac2
commit 01eb1f3e1a
3 changed files with 20 additions and 5 deletions

View File

@@ -597,8 +597,10 @@ trap "exit 0" SIGINT
# This must happen before we modify DISPLAY to preserve console detection
if [[ -z "$DISPLAY" ]]; then
dialogType="dialog"
elif command -v yad &> /dev/null; then
dialogType="yad"
else
dialogType="yad"
dialogType="dialog"
fi
# Source dialog interface early for progress display