install command doesn't work from subfolders with remote config
Closed this issue ยท 0 comments
ztzxt commented
๐ง Summary
when I run lefthook install from a subfolder, it fails with exit code 128
Lefthook version
1.8.2 9996e0d
Steps to reproduce
git clone https://github.com/justtrackio/lefthook-demo.git
cd lefthook-demo/subfolder
LEFTHOOK_VERBOSE=1 lefthook install
Expected results
lefthook install the hooks from remote config
Actual results
lefthook can't install the hooks from remote config
Possible Solution
Logs / Screenshots
โ subfolder git:(main) LEFTHOOK_VERBOSE=1 lefthook install
โ [lefthook] cmd: [git rev-parse --show-toplevel]
โ [lefthook] stdout: /git-repos/github/justtrackio/lefthook-demo
โ [lefthook] cmd: [git rev-parse --git-path hooks]
โ [lefthook] stdout: ../.git/hooks
โ [lefthook] cmd: [git rev-parse --git-path info]
โ [lefthook] stdout: ../.git/info
โ [lefthook] cmd: [git rev-parse --git-dir]
โ [lefthook] stdout: /git-repos/github/justtrackio/lefthook-demo/.git
โ [lefthook] cmd: [git hash-object -t tree /dev/null]
โ [lefthook] stdout: 4b825dc642cb6eb9a060e54bf8d69288fbee4904
โ Searching config in:/git-repos/github/justtrackio/lefthook-demo
โ Merging remote config: git@github.com:evilmartians/lefthook: ../.git/info/lefthook-remotes/lefthook/examples/remote/ping.yml
โ Cloning remote config repository: ../.git/info/lefthook-remotes/lefthook
โ [lefthook] cmd: [git -C ../.git/info/lefthook-remotes clone --quiet --origin origin --depth 1 git@github.com:evilmartians/lefthook lefthook]
โ [lefthook] dir: /git-repos/github/justtrackio/lefthook-demo
โ [lefthook] error: exit status 128
โ [lefthook] stdout:
โ [lefthook] stderr: fatal: cannot change to '../.git/info/lefthook-remotes': No such file or directory
Couldn't sync from git@github.com:evilmartians/lefthook. Will continue anyway: exit status 128