Skip to content

Commit a663db2

Browse files
Add run0 to elevation programs strategies
1 parent 2f2617d commit a663db2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ pub fn get_nix_version() -> Result<String> {
7979
///
8080
/// 1. `doas`
8181
/// 1. `sudo`
82+
/// 1. `run0`
8283
/// 1. `pkexec`
8384
///
8485
/// The logic for choosing this order is that a person with doas installed is more likely
@@ -95,7 +96,7 @@ pub fn get_elevation_program() -> Result<OsString> {
9596
return Ok(path?.into_os_string());
9697
}
9798

98-
const STRATEGIES: [&str; 3] = ["doas", "sudo", "pkexec"];
99+
const STRATEGIES: [&str; 4] = ["doas", "sudo", "run0", "pkexec"];
99100

100101
for strategy in STRATEGIES {
101102
if let Ok(path) = which(strategy) {

0 commit comments

Comments
 (0)