From f7772af19761e80702b54d640aa75f836ef6c788 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 24 Nov 2025 12:11:45 +0100 Subject: [PATCH] util: Fix invalid powershell redirection syntax used in uni shell env capture (#43390) Closes https://github.com/zed-industries/zed/issues/42869 Release Notes: - Fixed shell env sourcing not working with powershell on unix systems --- crates/util/src/shell_env.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/util/src/shell_env.rs b/crates/util/src/shell_env.rs index 02b262298795f8a50d9612f65479c0299e7e6a3e..307d127135aa642da088c206122765a80ddc3e88 100644 --- a/crates/util/src/shell_env.rs +++ b/crates/util/src/shell_env.rs @@ -55,6 +55,7 @@ async fn capture_unix( // xonsh doesn't support redirecting to stdin, and control sequences are printed to // stdout on startup ShellKind::Xonsh => (FD_STDERR, "o>e".to_string()), + ShellKind::PowerShell => (FD_STDIN, format!(">{}", FD_STDIN)), _ => (FD_STDIN, format!(">&{}", FD_STDIN)), // `>&0` };