Skip to content

Commit 329c29a

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Handle multiline in superconsole handle_stderr
Summary: Seems like newlines are removed in superconsole: `Span::sanitized` does it. And this function is called with newlines in stderr string. Reviewed By: krallin Differential Revision: D39315257 fbshipit-source-id: 809c9b173cbd358d11c4535e4333b843ad73f83d
1 parent 60c5272 commit 329c29a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

buck2_client/src/subscribers/superconsole.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,11 @@ impl EventSubscriber for StatefulSuperConsole {
320320
async fn handle_stderr(&mut self, msg: &str) -> anyhow::Result<()> {
321321
match &mut self.super_console {
322322
Some(super_console) => {
323-
super_console.emit(vec![Line::from_iter([Span::sanitized(msg)])]);
323+
super_console.emit(
324+
msg.lines()
325+
.map(|line| Line::from_iter([Span::sanitized(line)]))
326+
.collect(),
327+
);
324328
Ok(())
325329
}
326330
None => self.state.simple_console.handle_stderr(msg).await,

0 commit comments

Comments
 (0)