remote_server: Don't panic when forwarding stderr (#50505)
Closes ZED-5B7 Release Notes: - N/A
This commit is contained in:
1 parent
1c96982b4f
commit
ce5b4190ca
1 file changed
+8
-1
@@ -1,3 +1,5 @@
|
||||
use std::io::Write;
|
||||
|
||||
use crate::{
|
||||
RemoteArch, RemoteOs, RemotePlatform,
|
||||
json_log::LogRecord,
|
||||
@@ -137,7 +139,12 @@ fn handle_rpc_messages_over_child_process_stdio(
|
||||
if let Ok(record) = serde_json::from_slice::<LogRecord>(content) {
|
||||
record.log(log::logger())
|
||||
} else {
|
||||
eprintln!("(remote) {}", String::from_utf8_lossy(content));
|
||||
std::io::stderr()
|
||||
.write_fmt(format_args!(
|
||||
"(remote) {}\n",
|
||||
String::from_utf8_lossy(content)
|
||||
))
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
stderr_buffer.drain(0..start_ix);
|
||||
|
||||
Reference in new issue
Block a user