• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

evilmartians / lefthook / 14331394303
76%

Build:
DEFAULT BRANCH: master
Ran 08 Apr 2025 10:36AM UTC
Jobs 6
Files 56
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Apr 2025 10:36AM UTC coverage: 75.011% (-0.2%) from 75.227%
14331394303

push

github

web-flow
fix: fix command execution error on Windows #989 (#992)

* fix: fix command execution error on Windows #989
// This commit fixes an issue where Lefthook was unable to execute commands

- changed:   internal/lefthook/runner/exec/execute_windows.go
  fix: fullPathSh: change `sh.exe` for git bash installed in other directories
  fix: execute: cmdStr is dont escpape filename double quote, so replace
			    these to escaped double quote

* fix(Execute): fallback to Git-based paths when sh.exe is missing

Resolved a bug where sh.exe couldn't be found, causing shell command execution to fail.
Introduced helper functions `getFullPathSh` and `findExecutableDir` to locate sh.exe
via git-bash.exe, git.exe, or a default Git installation directory.

This ensures `CommandExecutor.Execute` works in environments where sh.exe is not in PATH.

Additional context:
- When git-bash.exe is found in a directory, sh.exe typically exists in its "bin" subdirectory.
- When git.exe is located at ".../cmd/git.exe", sh.exe is often found at the corresponding".

27 of 43 new or added lines in 1 file covered. (62.79%)

19 existing lines in 1 file now uncovered.

3332 of 4442 relevant lines covered (75.01%)

3.25 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
16
66.99
-4.44% internal/lefthook/runner/exec/execute_windows.go

Uncovered Existing Lines

Lines Coverage ∆ File
19
77.11
-4.71% internal/git/command_executor.go
Jobs
ID Job ID Ran Files Coverage
1 ubuntu-latest - 14331394303.1 08 Apr 2025 10:36AM UTC 55
37.34
GitHub Action Run
2 integration-windows-latest - 14331394303.2 08 Apr 2025 10:37AM UTC 54
54.89
GitHub Action Run
3 integration-ubuntu-latest - 14331394303.3 08 Apr 2025 10:36AM UTC 54
66.05
GitHub Action Run
4 macos-latest - 14331394303.4 08 Apr 2025 10:37AM UTC 55
37.34
GitHub Action Run
5 windows-latest - 14331394303.5 08 Apr 2025 10:37AM UTC 55
37.0
GitHub Action Run
6 integration-macos-latest - 14331394303.6 08 Apr 2025 10:37AM UTC 54
66.05
GitHub Action Run
Source Files on build 14331394303
  • Tree
  • List 56
  • Changed 4
  • Source Changed 4
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14331394303
  • eb38a8a7 on github
  • Prev Build on master (#14239613760)
  • Next Build on master (#14333299978)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc