Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
shell_env: Wrap error context in format! where missing (#42267)
Jakub Konka28a85158c77d
diff --git a/crates/util/src/shell_env.rs b/crates/util/src/shell_env.rsindex de9e1a0b260..7b823900798 100644--- a/crates/util/src/shell_env.rs+++ b/crates/util/src/shell_env.rs@@ -93,7 +93,9 @@ async fn capture_unix(// Parse the JSON output from zed --printenvlet env_map: collections::HashMap<String, String> = serde_json::from_str(&env_output)- .with_context(|| "Failed to deserialize environment variables from json: {env_output}")?;+ .with_context(|| {+ format!("Failed to deserialize environment variables from json: {env_output}")+ })?;Ok(env_map)}@@ -210,6 +212,7 @@ async fn capture_windows(let env_output = String::from_utf8_lossy(&output.stdout);// Parse the JSON output from zed --printenv- serde_json::from_str(&env_output)- .with_context(|| "Failed to deserialize environment variables from json: {env_output}")+ serde_json::from_str(&env_output).with_context(|| {+ format!("Failed to deserialize environment variables from json: {env_output}")+ })}