Skip to content
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

install command doesn't work from subfolders with remote config #871

Open
ztzxt opened this issue Nov 11, 2024 · 0 comments
Open

install command doesn't work from subfolders with remote config #871

ztzxt opened this issue Nov 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ztzxt
Copy link

ztzxt commented Nov 11, 2024

🔧 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: [email protected]: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 [email protected]: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 [email protected]:evilmartians/lefthook. Will continue anyway: exit status 128
@ztzxt ztzxt added the bug Something isn't working label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant