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.

util: Log JSON with envs if failed to deserialize (#41894)

Jakub Konkaa262ca1cd5ea
diff --git a/crates/util/src/shell_env.rs b/crates/util/src/shell_env.rs
index 394d88594d4..44f6a836a91 100644
--- a/crates/util/src/shell_env.rs
+++ b/crates/util/src/shell_env.rs
@@ -93,7 +93,7 @@ async fn capture_unix(
// Parse the JSON output from zed --printenv
let env_map: collections::HashMap<String, String> = serde_json::from_str(&env_output)
- .with_context(|| "Failed to deserialize environment variables from json")?;
+ .with_context(|| "Failed to deserialize environment variables from json: {env_output}")?;
Ok(env_map)
}
@@ -257,5 +257,5 @@ async fn capture_windows(
// Parse the JSON output from zed --printenv
serde_json::from_str(&env_output)
- .with_context(|| "Failed to deserialize environment variables from json")
+ .with_context(|| "Failed to deserialize environment variables from json: {env_output}")
}