-
Notifications
You must be signed in to change notification settings - Fork 220
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
Remote sync failures #680
Comments
A bit more testing led me to a more conclusive example. Repo 3 ran into the same error, so I moved to repo 4. In repo 4, I am using a script to synthesize our custom secrets rules into a gitleaks config. I simply created a new repo, copied over my existing
I remove the
It looks like the issue is here:
|
Thank you for submitting the issue. I will take a closer look a bit later. But indeed it seems like lefthook doesn't handle such conflicts. I will try to fix this ASAP. |
Thanks! I found that I could delete this directory ( One small suggestion would be to include the error text if a remote pull fails. For users that are just consumers of lefthook (my engineers, e.g.), this is all they get returned:
When we know that more useful information is included in the output:
So it looks like it failed, but then maybe like it still somehow succeeded. I foresee troubleshooting Slack messages, from the Engineering team, directed at me in the future. 😅 I appreciate your responses to all my questions, by the way. Thanks again! |
Hey, I've prepared a change that will trigger redownload of the remotes when |
Hey, with 1.6.9 release |
🔧 Summary
Testing this for implementation with our Engineering team, but have run into a bug (twice) where I can no longer pull from the remote, via
remotes
config:The first time, I was getting an error about having unstaged files. While I had some unstaged files, I then staged them, but the same error continued to pop.
The second issue manifested the same - unable to install the hooks - but because of a different reason. To test the first issue, I created a new repo and copied over my
lefthook.yml
file. The hooks installed fine. I continued on my way, until I did something illegal (I tried to pass{staged_files}
through to a script via environment variable.Removing this offending config, I expected the
lefthook install -f -v
command to successfully pulled down the fixed copy. Unfortunately, this did not occur.I created a third repo, and was able to copy the
lefthook.yml
config to that directory, which pulled without issue.It seems as though one failed merge of lefthook configs results in persistent errors.
Lefthook version
1.6.1
Steps to reproduce
lefthook install -f -v
lefthook install -f -v
Expected results
Remote configuration is successfully merged.
Actual results
Errors that cannot be fixed short of by migrating to a new directory.
Possible Solution
I imagine there is a local state being managed by lefthook that could be cleaned?
Logs / Screenshots
See above.
The text was updated successfully, but these errors were encountered: