so in my project, there are serveral pre-commit hooks to make sure our codes meet team standard, but whenever i try to commit changes, there is always an error saying executable was not found. usually, i first assumed there must be some problem with PATH environment variable value, but it's the only acutal git commit command that causes the issue.
yunu@LAPTOP-8FK6RMJ8:/mnt/d/Projects/xyz/idl$ pre-commit
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
yamllint.............................................(no files to check)Skipped
ensure buf...............................................................Passed
buf check lint...........................................................Passed
buf check breaking.......................................................Passed
yunu@LAPTOP-8FK6RMJ8:/mnt/d/Projects/xyz/idl$ git commit
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
yamllint.............................................(no files to check)Skipped
ensure buf...............................................................Failed
- hook id: ensure-buf
- exit code: 1
Executable `task` not found
buf check lint...........................................................Failed
- hook id: buf-lint
- exit code: 1
Executable `buf` not found
buf check breaking.......................................................Failed
- hook id: buf-breaking
- exit code: 1
Executable `buf` not found
and i can run the commands which were said to be not found right after this.
i can see that bash identifies these commands just fine.
yunu@LAPTOP-8FK6RMJ8:/mnt/d/Projects/xyz/idl$ buf
Usage:
buf [command]
Available Commands:
check Run lint or breaking change checks.
experimental Experimental commands. Unstable and will likely change.
help Help about any command
image Work with Images and FileDescriptorSets.
ls-files List all Protobuf files for the input location.
protoc High-performance protoc replacement.
Flags:
-h, --help help for buf
--log-format string The log format [text,color,json]. (default "color")
--log-level string The log level [debug,info,warn,error]. (default "info")
--timeout duration The duration until timing out. (default 2m0s)
-v, --version version for buf
Use "buf [command] --help" for more information about a command.
yunu@LAPTOP-8FK6RMJ8:/mnt/d/Projects/xyz/idl$
so what would be the issue? does git command use different kind of PATH of its own?
i'm running this on ubuntu wsl on windows 10.