Skip to content

Commit

Permalink
try build
Browse files Browse the repository at this point in the history
  • Loading branch information
ToyVo committed Dec 1, 2024
1 parent d6b13d6 commit bbaf5a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ impl Command {

pub fn run(&self) -> Result<()> {
let cmd = if self.elevate {
let mut cmd = Exec::cmd("sudo");
#[cfg(not(target_os = "macos"))]
let cmd = Exec::cmd("sudo");

// Check for if sudo has the preserve-env flag
#[cfg(target_os = "macos")]
cmd = cmd.args(
let cmd = Exec::cmd("sudo").args(
if Exec::cmd("sudo")
.args(&["--help"])
.stderr(Redirection::None)
Expand Down

0 comments on commit bbaf5a5

Please sign in to comment.