Skip to content

Commit 397bf24

Browse files
committed
add some debug logs
1 parent b213c8a commit 397bf24

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

  • clang-tools-manager/src/downloader/native_packages

clang-tools-manager/src/downloader/native_packages/unix.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,22 @@ impl PackageManager for UnixPackageManager {
127127
}
128128
}
129129
let output = if Self::has_sudo() && !matches!(self, UnixPackageManager::Homebrew) {
130+
log::debug!(
131+
"Running `sudo {} {} {package_id}`",
132+
self.as_str(),
133+
args.join(" ")
134+
);
130135
Command::new("sudo")
131136
.arg(self.as_str())
132137
.args(args)
133138
.arg(package_id.as_str())
134139
.output()?
135140
} else {
141+
log::debug!(
142+
"Running `{} {} {package_id}`",
143+
self.as_str(),
144+
args.join(" ")
145+
);
136146
Command::new(self.as_str())
137147
.args(args)
138148
.arg(package_id.as_str())
@@ -145,6 +155,10 @@ impl PackageManager for UnixPackageManager {
145155
if matches!(self, UnixPackageManager::Apt)
146156
&& let Some(version) = version
147157
{
158+
log::error!(
159+
"Failed to install {package_id} via apt: {}",
160+
String::from_utf8_lossy(&output.stderr)
161+
);
148162
log::info!(
149163
"trying to install from official LLVM PPA repository (for Debian-based `apt` package manager)"
150164
);

0 commit comments

Comments
 (0)