You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some developers in our company are using WSL but are using git from a windows context (e.g. by using git ui clients like SourceTree, TortoiseGit or from within an IDE like PHPStorm).
They usually have PHP installed inside WSL but not in windows.
Altough the plain git-hook-scripts are able to run, the execution of captainhook does not work.
Error messages like the following are shown when they are trying to commit: /usr/bin/env: 'php': No such file or directory
Proposed Solution
Add an additional run-mode (like docker or local) called wsl which executes the hook in wsl context.
The existing run-exec exec setting could be used to further customize the wsl command (specify distributions etc.) used for the context switch.
The text was updated successfully, but these errors were encountered:
Thinking of it, probably the docker run mode can be abused to execute the hooks in wsl (via the run-exec setting).
I did not look at the code yet, but if the docker run mode is not too specific towards docker in particular, the run mode could be generalized/renamed?
Issue / Use Case
Some developers in our company are using WSL but are using git from a windows context (e.g. by using git ui clients like SourceTree, TortoiseGit or from within an IDE like PHPStorm).
They usually have PHP installed inside WSL but not in windows.
Altough the plain git-hook-scripts are able to run, the execution of captainhook does not work.
Error messages like the following are shown when they are trying to commit:
/usr/bin/env: 'php': No such file or directory
Proposed Solution
Add an additional
run-mode
(likedocker
orlocal
) calledwsl
which executes the hook in wsl context.The existing
run-exec
exec setting could be used to further customize thewsl
command (specify distributions etc.) used for the context switch.The text was updated successfully, but these errors were encountered: