From a262ca1cd5ea64cc099d6e8189478ec3eb3a0c43 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Tue, 4 Nov 2025 15:30:26 +0100 Subject: [PATCH] util: Log JSON with envs if failed to deserialize (#41894) Release Notes: - N/A --- crates/util/src/shell_env.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/util/src/shell_env.rs b/crates/util/src/shell_env.rs index 394d88594d4f278836c7ed3b112936f9153c9110..44f6a836a91b13f6b1a742832b31642f0543b995 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 = 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}") }