util: Add missing quotes in shell env capturing on windows (#41902)

Lukas Wirth created

Release Notes:

- Fixed shell env capturing failing if zed is installed on a path with
whitespace in it

Change summary

crates/util/src/shell_env.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

crates/util/src/shell_env.rs 🔗

@@ -202,7 +202,7 @@ async fn capture_windows(
                 .args([
                     "-c",
                     &format!(
-                        "cd '{}'; {}{} --printenv",
+                        "cd '{}'; {}'{}' --printenv",
                         directory.display(),
                         shell_kind
                             .command_prefix()
@@ -231,7 +231,7 @@ async fn capture_windows(
                 .args([
                     "/c",
                     &format!(
-                        "cd '{}'; {} --printenv",
+                        "cd '{}'; '{}' --printenv",
                         directory.display(),
                         zed_path.display()
                     ),