Skip to content

Commit

Permalink
refactor: Show better errors for conan profile detect
Browse files Browse the repository at this point in the history
Silence pedantic Clippy warnings.
  • Loading branch information
ravenexp committed Nov 27, 2024
1 parent f371c0d commit e9adb37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,20 @@ impl ConanInstall {
command.arg("profile").arg("detect").arg("--exist-ok");

if let Some(profile) = profile {
println!("running 'conan profile detect' for profile '{profile}'");

command.arg("--name").arg(profile);
} else {
println!("running 'conan profile detect' for the default profile");
}

let status = command
.status()
.expect("failed to run the Conan executable");

#[allow(clippy::manual_assert)]
if !status.success() {
panic!("conan profile detect command failed: {}", status);
panic!("'conan profile detect' command failed: {status}");
}
}

Expand Down

0 comments on commit e9adb37

Please sign in to comment.