Issue with commit on Windows
Describe the bug Trying to perform my first commit using gitui, getting such error:
Error
commit error:
io error:program not found
Line from log:
[ERROR] hookspath error: config value 'core.hooksPath' was not found; class=Config (7); code=NotFound (-3)
To Reproduce Steps to reproduce the behavior:
- Stage some changes.
-
Cfor commit command. - Type commit message.
- Enter.
- Error.
Expected behavior Completed commit or more verbose error message.
Screenshots

Context (please complete the following information):
- Windows 10
- GitUI 0.22.1
do you use ny git commit hooks?
Yes, I do. It is pre-commit hook which validates that I am not committing TODO comments. But it should pass that specific commit.
Can you share the path of the hook and the content of the script? also tell me if you use core.hooksPath and if so how it is configured
I am not using hooksPath setting. Hook itself is located inside .git folder, path: repoRoot/.git/hooks/pre-commit.
Hook itself is redirecting to powershell script, located in common folder:
#!/bin/sh
echo
exec powershell.exe -NoProfile -ExecutionPolicy Bypass -File 'D:\ps\hook.ps1'
exit
Just to be complete, here is content of hook.ps1:
if((git diff --cached) -like "*TODO*"){
Write-Output "TODO is present in pending changes, commit rejected"
exit 1
}
It works fine with git command, also handled properly with VisualStudio Git integration.
that is an interesting setup. that's likely to be the problem. I have no test for such thing
@extrawurst I repro'd this using 0.22.1 but its fine in master head. I think it was fixed by https://github.com/extrawurst/gitui/pull/1532,
Let’s see after next release then
@extrawurst - ignore that last message, bug seems to be back (I'm probably trying to do too many thigns at once!)
This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.