Fix build errors on Unix

This commit is contained in:
Brian Bowman
2022-07-05 05:49:25 -05:00
parent a3e1898d82
commit 4f63e55a28
4 changed files with 65 additions and 30 deletions

View File

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