Fix bash detection failure in VS Code Codex extension on Windows under certain conditions (#3421)

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.
This commit is contained in:
Axojhf
2025-10-29 12:29:16 +08:00
committed by GitHub
parent e9135fa7c5
commit 802d2440b4

View File

@@ -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()