From 059fd50f54015bcda381cf897f8a85deca59936a Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 14 Aug 2026 14:05:12 -0400 Subject: [PATCH 1/3] Remove broken WSL bash workaround --- .github/workflows/ci.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b1ba7a7..4552e41 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -94,14 +94,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Remove Broken WSL bash executable - if: ${{ matrix.os == 'windows-latest' }} - shell: cmd - run: | - takeown /F C:\Windows\System32\bash.exe - icacls C:\Windows\System32\bash.exe /grant administrators:F - del C:\Windows\System32\bash.exe - - uses: Swatinem/rust-cache@v2 - name: Test From 0bd041546cadb0633e542105505cbfed101b6ede Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 14 Aug 2026 14:11:07 -0400 Subject: [PATCH 2/3] Put Git Bash first on Windows PATH --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4552e41..7287a1a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -94,6 +94,10 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Put Git Bash on PATH + if: ${{ matrix.os == 'windows-latest' }} + run: cygpath -w "$(dirname "$BASH")" >> "$GITHUB_PATH" + - uses: Swatinem/rust-cache@v2 - name: Test From 6c7f4d7daa7eea1bb8e9e42948683208bb3e9208 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 14 Aug 2026 14:18:42 -0400 Subject: [PATCH 3/3] Resolve Windows commands from PATH --- src/command.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/command.rs b/src/command.rs index 30cb916..ab07ed6 100644 --- a/src/command.rs +++ b/src/command.rs @@ -20,7 +20,22 @@ impl Command { } pub(crate) fn execute(&self) -> Result { - let output = process::Command::new(&self.program) + #[cfg(target_os = "windows")] + let program = std::env::var_os("PATH") + .into_iter() + .flat_map(|path| std::env::split_paths(&path).collect::>()) + .flat_map(|directory| { + ["", ".com", ".exe", ".bat", ".cmd"].map(move |extension| { + directory.join(format!("{}{extension}", self.program)) + }) + }) + .find(|path| path.is_file()) + .unwrap_or_else(|| self.program.clone().into()); + + #[cfg(not(target_os = "windows"))] + let program = &self.program; + + let output = process::Command::new(program) .args(&self.arguments) .output();