Skip to content

Commit 9ef398f

Browse files
committed
use --noconfirm for pacman and no sudo for homebrew
1 parent 72daee3 commit 9ef398f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • clang-installer/src/downloader/native_packages

clang-installer/src/downloader/native_packages/unix.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,14 @@ impl PackageManager for UnixPackageManager {
119119
}
120120
#[cfg(target_os = "linux")]
121121
UnixPackageManager::PacMan => {
122-
args.extend(["-S", "-y"]);
122+
// spell-checker: disable-next-line
123+
args.extend(["-S", "--noconfirm"]);
123124
}
124125
UnixPackageManager::Homebrew => {
125126
args.push("install");
126127
}
127128
}
128-
let output = if Self::has_sudo() {
129+
let output = if Self::has_sudo() && !matches!(self, UnixPackageManager::Homebrew) {
129130
Command::new("sudo")
130131
.arg(self.as_str())
131132
.args(args)

0 commit comments

Comments
 (0)