Skip to content

Commit

Permalink
feat: print stderr for rust compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLinCool committed Sep 24, 2024
1 parent 1c6b4aa commit 4004b73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compilers/rs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ impl Compiler for RsCompiler {
fn describe(&self) -> String {
let version_output = Command::new(COMPILE_COMMAND).arg("--version").output();
let version = match version_output {
Ok(output) => String::from_utf8_lossy(&output.stdout).to_string(),
Ok(output) => {
if !output.stderr.is_empty() {
eprintln!("{}", String::from_utf8_lossy(&output.stderr));
}
String::from_utf8_lossy(&output.stdout).to_string()
}
Err(_) => String::from("unknown"),
};

Expand Down

0 comments on commit 4004b73

Please sign in to comment.