mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 07:46:12 +03:00
core: prohibit checking for the desktop environment on linux during comptime
This commit is contained in:
@ -75,6 +75,7 @@ pub fn desktopEnvironment() DesktopEnvironment {
|
||||
.macos => .macos,
|
||||
.windows => .windows,
|
||||
.linux => de: {
|
||||
if (@inComptime()) @compileError("Checking for the desktop environment on Linux must be done at runtime.");
|
||||
// use $XDG_SESSION_DESKTOP to determine what DE we are using on Linux
|
||||
// https://www.freedesktop.org/software/systemd/man/latest/pam_systemd.html#desktop=
|
||||
const de = posix.getenv("XDG_SESSION_DESKTOP") orelse break :de .other;
|
||||
|
Reference in New Issue
Block a user