lefthook icon indicating copy to clipboard operation
lefthook copied to clipboard

`lefthook version` fails with `exit status 128` outside of git repo

Open Herve-M opened this issue 5 years ago • 5 comments

Hello,

Context:

  • Windows 10
  • Build 0.6.5 downloaded from github lefthook_0.6.5_Windows_x86_64.zip

Problem: lefthook.exe version should return the current version.

Actual behavior

In a non git repo. without lefthook.yml, exit status 128 is returned In a git repo. with lefthook.yml, 0.6.5 is returned.

Waited behavior

0.6.5 must be returned

Herve-M

Herve-M avatar Nov 19 '19 02:11 Herve-M

@Arkweid Was this fix released? If yes, it appears there may be a regression. I'm using 0.7.2, and I see exactly what the OP describes. Run lefthook version in a folder without a Git repository, receive exit status 128. Run lefthook version in a folder with a Git repository, receive 0.7.2.

seniorquico avatar Jun 11 '20 15:06 seniorquico

Nothing windows-specific here. I'm also observing this behavior on Linux for 0.7.3 built from Homebrew and installed from Ruby gem. But version 0.6.4 from snap store works as expected.

So most probably it was broken in 0.6.5.

Also #114

Envek avatar Apr 26 '21 13:04 Envek

Fix for that has been released in 0.7.4

Envek avatar Apr 30 '21 15:04 Envek

I just downloaded the Linux x86_64 binaries for versions 0.7.4, 0.7.5, and 0.7.6, and of those lefthook version only works in version0.7.4.

[Edit] Actually, all of the sub command seem to not work in 0.7.5 and 0.7.6

pwinckles avatar Jun 04 '21 19:06 pwinckles

Oh yes, we broke it again! Thank you for heads up

Envek avatar Jun 07 '21 15:06 Envek

This doesn't fail now from v1.0.0

mrexox avatar Nov 25 '22 07:11 mrexox