fix: flush cargo logs (#3282)

This commit is contained in:
Miles Murgaw authored and GitHub committed 2024-12-05 10:50:30 -08:00
1 parent bff5478fdf
commit f3b6ec5a2c
1 file changed
+7
+7
View File
@@ -249,6 +249,13 @@ impl Builder {
return Ok(bundle);
}
BuildUpdate::BuildFailed { err } => {
// Flush remaining compiler messages
while let Ok(Some(msg)) = self.rx.try_next() {
if let BuildUpdate::CompilerMessage { message } = msg {
tracing::info!(json = ?StructuredOutput::CargoOutput { message: message.clone() }, %message);
}
}
tracing::error!(?err, json = ?StructuredOutput::Error { message: err.to_string() });
return Err(err);
}