Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
remote_server: Don't panic when forwarding stderr (#50505)
Cole Millerdb8f64935a8d
diff --git a/crates/remote/src/transport.rs b/crates/remote/src/transport.rsindex 09bb22ddbe2..8d0f212cfc4 100644--- a/crates/remote/src/transport.rs+++ b/crates/remote/src/transport.rs@@ -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);