Make sure that lgm is not ran as root.

This commit is contained in:
Storm Dragon
2025-11-08 12:47:48 -05:00
parent 5316c5c113
commit be63211e6b

View File

@@ -802,6 +802,12 @@ migrate_launcher() {
}
# Make sure this is not ran as root
if [[ "$(whoami)" == "root" ]]; then
echo "Please do not run ${0##*/} as root."
exit 1
fi
# Detect dialog interface type BEFORE potentially setting DISPLAY
# This must happen before we modify DISPLAY to preserve console detection
if [[ -z "$DISPLAY" ]]; then