lefthook icon indicating copy to clipboard operation
lefthook copied to clipboard

Receiving exit status 128 on install

Open sydneybrokeit opened this issue 4 years ago • 3 comments

When I attempt to run lefthook install inside a repo directory, I am getting exit status 128.

When I ran this on another machine, it worked without issue.

sydneybrokeit avatar Oct 27 '21 18:10 sydneybrokeit

That is weird. No idea what is going on.

Can you please tell us: your OS, lefthook version, how you have installed lefthook, and also output of git rev-parse --git-path hooks from within repository on both machines?

Envek avatar Oct 28 '21 14:10 Envek

On the failing machine:

  • OS: Ubuntu 14.04.5
  • Lefthook version: 0.7.7
  • Installation method: I have tested this using both a direct binary download, as well as installing the .deb package for both 0.7.7 and 0.7.6
fatal: ambiguous argument 'hooks': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

On the succeeding machine:

  • OS: Ubuntu 18.04
  • Lefthook version: 0.7.7
  • Installation method: direct binary download .git/hooks is the output from the command given.

sydneybrokeit avatar Oct 28 '21 16:10 sydneybrokeit

OS: Ubuntu 14.04.5 fatal: ambiguous argument 'hooks': unknown revision or path not in the working tree.

Jeez, seems like your git is very old (and your Ubuntu reached its End-of-life at least 2 years ago).

We rely on commands like git rev-parse --git-path hooks internally, if they are not implemented then Lefthook won't work, sorry.

Envek avatar Oct 28 '21 17:10 Envek

This issue looks stale. I guess that upgrading git helped. Closing it.

Feel free to open a new issue or comment here if something doesn't work still!

mrexox avatar Dec 13 '22 08:12 mrexox