Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
Signed-off-by: smtmfft <[email protected]>
  • Loading branch information
smtmfft committed Sep 7, 2024
1 parent 8845a2a commit b95625a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions pipeline/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ impl CommandBuilder {
Ok(output) => {
if output.status.success() {
println!("Command succeeded with output: {:?}", output.stdout);
Some(String::from_utf8_lossy(&output.stdout).trim().to_string())
if let Ok(out) = String::from_utf8(output.stdout) {
let out = out.trim();
println!("Using {tool}: {out}");
Some(PathBuf::from(out))
} else {
None
}
} else {
eprintln!("Command failed with status: {}", output.status);
None
Expand All @@ -146,16 +152,6 @@ impl CommandBuilder {
None
}
}

let Ok(out) = String::from_utf8(stdout) else {
return None;
};

let out = out.trim();

println!("Using {tool}: {out}");

Some(PathBuf::from(out))
}

pub fn new(meta: &Metadata, target: &str, toolchain: &str) -> Self {
Expand Down

0 comments on commit b95625a

Please sign in to comment.