From de375c91bbaa5d0c8c5840557d6285f656eabc13 Mon Sep 17 00:00:00 2001 From: Bot_wxt1221 <3264117476@qq.com> Date: Sun, 21 Jul 2024 17:05:32 +0800 Subject: [PATCH] fix: nixos's headless mode. (#8774) --- src/platform/linux.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 0810bb246..f936bfb8c 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -730,7 +730,7 @@ pub fn block_input(_v: bool) -> (bool, String) { pub fn is_installed() -> bool { if let Ok(p) = std::env::current_exe() { - p.to_str().unwrap_or_default().starts_with("/usr") + p.to_str().unwrap_or_default().starts_with("/usr") || p.to_str().unwrap_or_default().starts_with("/nix/store") } else { false }