fix: nixos's headless mode. (#8774)

This commit is contained in:
Bot_wxt1221 2024-07-21 17:05:32 +08:00 committed by GitHub
parent d3454f07d3
commit de375c91bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}