ssh remote: Stream stderr from server via proxy to client (#19073)

Release Notes:

- N/A

---------

Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Thorsten BallandBennet authored and GitHub committed 2024-10-11 17:11:20 +02:00
1 parent 9e1f3347fa
commit 3bb9060231
3 files changed
+220 -97

No files matched your search

+1 -2
View File
@@ -836,8 +836,7 @@ impl SshRemoteClient {
let line_ix = start_ix + ix;
let content = &stderr_buffer[start_ix..line_ix];
start_ix = line_ix + 1;
if let Ok(mut record) = serde_json::from_slice::<LogRecord>(content) {
record.message = format!("(remote) {}", record.message);
if let Ok(record) = serde_json::from_slice::<LogRecord>(content) {
record.log(log::logger())
} else {
eprintln!("(remote) {}", String::from_utf8_lossy(content));