summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-05-23 17:00:15 -0700
committerJesse Vincent <jesse@primeradiant.com>2026-05-23 17:00:15 -0700
commitd48bec6cc38daf4def0c816e49bfcb92f4605fb3 (patch)
tree5be39f48ba1fed3d5ffc7e0ce14dff9787b25023
parenta8f0738e3a76f3ade5530af9bd0c37cedadd3c44 (diff)
Revert "Probe per-user Git Bash and Scoop before falling back to PATH on Windows"
This reverts commit a8f0738e3a76f3ade5530af9bd0c37cedadd3c44.
-rwxr-xr-xhooks/run-hook.cmd15
1 files changed, 1 insertions, 14 deletions
diff --git a/hooks/run-hook.cmd b/hooks/run-hook.cmd
index 557dba8..ceec3a7 100755
--- a/hooks/run-hook.cmd
+++ b/hooks/run-hook.cmd
@@ -26,21 +26,8 @@ if exist "C:\Program Files (x86)\Git\bin\bash.exe" (
"C:\Program Files (x86)\Git\bin\bash.exe" "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%
)
-REM Per-user Git for Windows installer ("Only for me" / winget user scope)
-if exist "%LOCALAPPDATA%\Programs\Git\bin\bash.exe" (
- "%LOCALAPPDATA%\Programs\Git\bin\bash.exe" "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
- exit /b %ERRORLEVEL%
-)
-REM Scoop user install (`scoop install git`)
-if exist "%USERPROFILE%\scoop\apps\git\current\usr\bin\bash.exe" (
- "%USERPROFILE%\scoop\apps\git\current\usr\bin\bash.exe" "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
- exit /b %ERRORLEVEL%
-)
-REM Try bash on PATH (e.g. user-installed Git Bash, MSYS2, Cygwin). Note that
-REM on stock Windows 10/11 `where bash` resolves to C:\Windows\System32\bash.exe
-REM (the WSL launcher), which fails on Windows-style script paths. The explicit
-REM probes above must therefore be exhausted first.
+REM Try bash on PATH (e.g. user-installed Git Bash, MSYS2, Cygwin)
where bash >nul 2>nul
if %ERRORLEVEL% equ 0 (
bash "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9