Skip to content

Commit ab89ef2

Browse files
committed
fix: running installer from non-gui sessions was failing
1 parent 1804667 commit ab89ef2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/linux/installer-pre-prod.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,13 @@ show_help() {
717717
echo
718718
echo "Without any options, the script will install Phoenix Code."
719719
}
720+
721+
# Check for GUI session by looking for DISPLAY or WAYLAND_DISPLAY variables
722+
if [ -z "${DISPLAY:-}" ] && [ -z "${WAYLAND_DISPLAY:-}" ]; then
723+
echo "This script should only be run from terminals in GUI sessions."
724+
exit 1
725+
fi
726+
720727
case "${1-}" in
721728
-h|--help)
722729
show_help # Function to show help

0 commit comments

Comments
 (0)