Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Redact sensitive environment variables in LSP Logs: Server Info (#43480)

Peter Tripp83f0a3fd1364
diff --git a/crates/language_tools/src/lsp_log_view.rs b/crates/language_tools/src/lsp_log_view.rs
index e7586583704..4cf47cab079 100644
--- a/crates/language_tools/src/lsp_log_view.rs
+++ b/crates/language_tools/src/lsp_log_view.rs
@@ -340,11 +340,11 @@ impl LspLogView {
* Configuration: {CONFIGURATION}",
NAME = info.status.name,
ID = info.id,
- BINARY = info.status.binary.as_ref().map_or_else(
- || "Unknown".to_string(),
- |binary| serde_json::to_string_pretty(binary)
- .unwrap_or_else(|e| format!("Failed to serialize binary info: {e:#}"))
- ),
+ BINARY = info
+ .status
+ .binary
+ .as_ref()
+ .map_or_else(|| "Unknown".to_string(), |binary| format!("{:#?}", binary)),
WORKSPACE_FOLDERS = info
.status
.workspace_folders