-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support cygpath for cygwin-based git executable #70
Conversation
I was literally just working on a fix for this. My fix was
Yours seems more comprehensive. Any idea when this'll make it in? Would be nice to be able to use this with Cygwin. |
@the0neWhoKnocks suggested regex will work on |
Since cygwin doesn't seem to have a great support in Node, I have mixed feelings about adding cygwin specific commands/code in husky. That said, I'm considering https://www.npmjs.com/package/find-parent-dir as an alternative way to find I've not yet tested it on cygwin but maybe it wouldn't have the same issue with |
I've been previously suggested |
I've just published a beta version that doesn't rely on git command and should work with cygwin. If you want to give it a try:
Let me know if you still have issues with it. |
@typicode - Gave the beta a whirl and things are working as they used to again. 👍 |
Awesome thanks @kwonoj, @the0neWhoKnocks for the feedback and help. |
Isn't this related to #673 ? |
This PR updates behavior of getting git path for edge-case windows users, like using git executable from
msys2
or similar (i.e,cygwin
).Since those git executable returns path as *nix style in windows system, it'll end up husky hook installation fails by
try to create hook under
Z:\z\github\g\.git\hooks
, instead of correct windows pathZ:\github\g\.git\hooks
In changes, it borrows
cygpath
included inmsys2
andcygwin
and let it correct path to windows style paths.