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

Release Notes:

- N/A
This commit is contained in:
Jakub Konka
2025-11-04 15:30:26 +01:00
committed by GitHub
parent 6a38d699dc
commit a262ca1cd5
+2 -2
View File
@@ -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}")
}