upgpkg: discord 0.0.112-4: fix wayland detection

There is a false positive on non-wayland systems because the socket extistance
test end up checking whether XDG_RUNTIME_DIR exists (which is always true)
This commit is contained in:
Zoddo 2025-10-17 21:30:02 +02:00
parent a95bf2437b
commit 0338eedbf5
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: D8BC117B5ED86DED
3 changed files with 5 additions and 5 deletions

View file

@ -32,7 +32,7 @@ for line in "${MAPFILE[@]}"; do
fi
done
if [[ -e "${XDG_RUNTIME_DIR:-}/${WAYLAND_SOCKET:-}" || -e "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == "wayland" ]]; then
if [[ -S "${XDG_RUNTIME_DIR:-}/${WAYLAND_SOCKET:-}" || -e "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == "wayland" ]]; then
# work around electron's broken wayland detection
# TODO: remove when Arch updates to an electron release that includes the fix
# https://github.com/electron/electron/pull/48301