From c89df01e13cbb712179bfb6cdc79f76a8a07dd29 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Wed, 1 Jan 2025 18:49:26 -0600 Subject: [PATCH] core: prohibit checking for the desktop environment on linux during comptime --- src/os/desktop.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/desktop.zig b/src/os/desktop.zig index 20738f191..3a61e2eaa 100644 --- a/src/os/desktop.zig +++ b/src/os/desktop.zig @@ -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;