Automatically detect gsudo (#469)
This commit is contained in:
committed by
GitHub
parent
69b9c4b24c
commit
065565240e
@@ -87,9 +87,8 @@ pub fn which<T: AsRef<OsStr> + Debug>(binary_name: T) -> Option<PathBuf> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn sudo() -> Option<PathBuf> {
|
||||
which("sudo").or_else(|| which("pkexec"))
|
||||
which("sudo").or_else(|| which("gsudo")).or_else(|| which("pkexec"))
|
||||
}
|
||||
|
||||
pub fn editor() -> Vec<String> {
|
||||
|
||||
Reference in New Issue
Block a user