mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Fix build errors on Unix
This commit is contained in:
@@ -76,7 +76,14 @@ pub fn install_location() -> String {
|
||||
return exe_path.to_str().unwrap().to_string();
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tauri::command]
|
||||
pub fn is_elevated() -> bool {
|
||||
return is_elevated::is_elevated();
|
||||
}
|
||||
is_elevated::is_elevated()
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[tauri::command]
|
||||
pub fn is_elevated() -> bool {
|
||||
sudo::check() == sudo::RunningAs::Root
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user