From 802d2440b4edc511d161acd7428e98347fbac886 Mon Sep 17 00:00:00 2001 From: Axojhf <20625305+axojhf@users.noreply.github.com> Date: Wed, 29 Oct 2025 12:29:16 +0800 Subject: [PATCH] Fix bash detection failure in VS Code Codex extension on Windows under certain conditions (#3421) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found that the VS Code Codex extension throws “Error starting conversation” when initializing a conversation with Git for Windows’ bash on PATH. Debugging showed the bash-detection logic did not return as expected; this change makes it reliable in that scenario. Possibly related to issue #2841. --- codex-rs/core/src/shell.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/codex-rs/core/src/shell.rs b/codex-rs/core/src/shell.rs index e164e5b4..197c00ba 100644 --- a/codex-rs/core/src/shell.rs +++ b/codex-rs/core/src/shell.rs @@ -98,6 +98,7 @@ pub async fn default_user_shell() -> Shell { .unwrap_or(false); let bash_exe = if Command::new("bash.exe") .arg("--version") + .stdin(std::process::Stdio::null()) .output() .await .ok()