Reputation: 61
I have tried to set a pre-commit hook and I have installed https://www.npmjs.com/package/git-pre-commit on Ubuntu 16.04 and now when commiting I have an error that cannot be fixed:
.git/hooks/pre-commit: 9: [: %PATH%: unexpected operator
/usr/bin/env: ‘node’: No such file or directory
I have installed node with package manager and tried to fix this error based on https://github.com/animetosho/Nyuu/issues/14 but without success. I have also tried to uninstall git-pre-commit and to remove everything but error is still here.
Just to mention that node and npm was functioning prior to this.
Would help if I could narrow down what is causing this.
Thanks.
Upvotes: 0
Views: 817
Reputation: 61
It seems that error was in pre-commit.sample in https://www.npmjs.com/package/git-pre-commit so I have deleted it and install https://www.npmjs.com/package/pre-commit.
Error is gone. This is if someone has same experience.
Upvotes: 1