-
Notifications
You must be signed in to change notification settings - Fork 348
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
Commits in GitKraken #18
Comments
I actually think that I may have found something already. In /src/commands/prepare-commit-msg-hook.ts on line 18, you check if the commit message is already set and stops the execution if it is. Since I need to type something to actually commit, this would always disable opencommit. |
Removing that from the hook and changing the first line to my full node path enabled it. It would be great if line 18 is optional (maybe configurable per project via the cli) and the first line should contain the full path to node to work with GitKraken (maybe globally configurable via the cli) |
I created #19 for the configurable line 18 check, but I don't know how to fix the node path error. |
wow, that's great research! now i see what #19 is about, nice. let me check it one more time |
have you tried this https://stackoverflow.com/a/26320915? may solve the |
I just tried it, but that doesn't work either, since you call |
@Lars- thats great, could you close the issue pls <3 |
First of all: wow it works great in the CLI, this is going to save me a lot of time.
Is it possible to make it work in GitKraken as well? I have set the hook, and it is recognized by the client, but I need to type a commit message before I can click the commit button.
GitKraken then says that the hook exited with error code 127. In the logs I see this:
/usr/bin/env 'node': file or folder doesn't exist
. When I execute/usr/bin/env node
in my terminal it works, so GitKraken seems to have some sort of other context.I tried changing the first line of the hook to
#!/home/lars/.nvm/versions/node/v16.18.1/bin/node
(since that is the full path to my node executable). GitKraken then says that the hook executed succesfully, but it didn't change the commit text that I needed to type to be able to click on the commit button...What to do to fix this? Or what can I do to debug this further?
The text was updated successfully, but these errors were encountered: