Skip to content

Commit

Permalink
Wrap in block.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jan 31, 2025
1 parent 20d808f commit d8eca6e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/system-env/src/pm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,14 @@ impl SystemPackageManager {
/// "doas" or "sudo", and on Windows this does nothing.
pub fn get_elevated_command(&self) -> Option<&str> {
#[cfg(unix)]
if is_command_on_path("doas") {
Some("doas")
} else if is_command_on_path("sudo") {
Some("sudo")
} else {
None
{
if is_command_on_path("doas") {
Some("doas")
} else if is_command_on_path("sudo") {
Some("sudo")
} else {
None
}
}

#[cfg(windows)]
Expand Down

0 comments on commit d8eca6e

Please sign in to comment.