diff --git a/map_gui/src/tools/command.rs b/map_gui/src/tools/command.rs index a5039237fb..19eee91464 100644 --- a/map_gui/src/tools/command.rs +++ b/map_gui/src/tools/command.rs @@ -37,7 +37,7 @@ impl RunCommand { &args, subprocess::PopenConfig { stdout: subprocess::Redirection::Pipe, - stderr: subprocess::Redirection::Pipe, + stderr: subprocess::Redirection::Merge, ..Default::default() }, ) { @@ -75,14 +75,12 @@ impl RunCommand { // This is almost always a timeout. Err(err) => err.capture, }; - // TODO This doesn't interleave stdout and stderr as expected. - for raw in vec![stdout, stderr] { - if let Some(bytes) = raw { - if let Ok(string) = String::from_utf8(bytes) { - if !string.is_empty() { - for line in string.split("\n") { - new_lines.push(line.to_string()); - } + assert!(stderr.is_none()); + if let Some(bytes) = stdout { + if let Ok(string) = String::from_utf8(bytes) { + if !string.is_empty() { + for line in string.split("\n") { + new_lines.push(line.to_string()); } } }