Skip to content

Commit

Permalink
integration-test: Fix build.rs output
Browse files Browse the repository at this point in the history
The cargo::warning seems to ignore output after a newline.
Iterate over the entire rendered message and print it line-by-line.

Signed-off-by: Dave Tucker <[email protected]>
  • Loading branch information
dave-tucker committed Feb 19, 2024
1 parent cd03087 commit 5380a95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/integration-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ fn main() {
}
}
Message::CompilerMessage(CompilerMessage { message, .. }) => {
println!("cargo:warning={message}");
for line in message.rendered.unwrap_or_default().split('\n') {
println!("cargo:warning={line}");
}
}
Message::TextLine(line) => {
println!("cargo:warning={line}");
Expand Down
4 changes: 3 additions & 1 deletion xtask/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ where
}
}
Message::CompilerMessage(CompilerMessage { message, .. }) => {
println!("{message}");
for line in message.rendered.unwrap_or_default().split('\n') {
println!("cargo:warning={line}");
}
}
Message::TextLine(line) => {
println!("{line}");
Expand Down

0 comments on commit 5380a95

Please sign in to comment.