Skip to content

Commit 63aae25

Browse files
committed
fix: check for ui session
1 parent ab89ef2 commit 63aae25

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/linux/installer-latest-experimental-build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,12 @@ show_help() {
746746
echo
747747
echo "Without any options, the script will install Phoenix Code."
748748
}
749+
# Check for GUI session by looking for DISPLAY or WAYLAND_DISPLAY variables
750+
if [ -z "${DISPLAY:-}" ] && [ -z "${WAYLAND_DISPLAY:-}" ]; then
751+
echo "This script should only be run from terminals in GUI sessions."
752+
exit 1
753+
fi
754+
749755
case "${1-}" in
750756
-h|--help)
751757
show_help # Function to show help

0 commit comments

Comments
 (0)