Skip to content

Commit c7b6f71

Browse files
dvishal485NotAShelf
authored andcommitted
update usage of SUDO_ASKPASS -> NH_SUDO_ASKPASS
with reference to #261 (comment)
1 parent 85ae10c commit c7b6f71

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/commands.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ impl Command {
8383
Exec::cmd("sudo")
8484
};
8585

86-
// use SUDO_ASKPASS program for sudo if present
87-
let cmd = if std::env::var("SUDO_ASKPASS").is_ok() {
86+
// use NH_SUDO_ASKPASS program for sudo if present
87+
let cmd = if std::env::var("NH_SUDO_ASKPASS").is_ok() {
8888
cmd.arg("-A")
8989
} else {
9090
cmd

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn self_elevate() -> ! {
4545
use std::os::unix::process::CommandExt;
4646

4747
let mut cmd = std::process::Command::new("sudo");
48-
// use SUDO_ASKPASS program for sudo if present
49-
if std::env::var("SUDO_ASKPASS").is_ok() {
48+
// use NH_SUDO_ASKPASS program for sudo if present
49+
if std::env::var("NH_SUDO_ASKPASS").is_ok() {
5050
cmd.arg("-A");
5151
}
5252

0 commit comments

Comments
 (0)