-
Notifications
You must be signed in to change notification settings - Fork 222
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
Error using {push_files} #374
Comments
Well, I guess I know more golang that I thought... this line is causing the error. Primary branch names are no longer called for now i've just switched to using to work around it: shellcheck:
tags: sast
files: git diff --name-only HEAD @{push} || git diff --name-only HEAD main
glob: "*.sh"
run: scripts/shellcheck.sh {files} |
Hi! Thank you for the issue. I knew that someday it would shoot. I think this command should be changed to get the diff from the first parent of the current branch. However this could break it for other people using the tool if I put it to the fix version. I think this can be done for the next minor/major release of lefthook. What do you think? |
I think including it in the next major release would make sense to me, that way folks can opt-out or give time to fix any issues it may have with their current setup. |
Just ran into this when pushing the PR to a repo that (wait for it) uses the |
Any updates on this? |
Summary
Whenever I pass the
{push_files}
argument to arun:
in thepre-push
section I just get this error message that sayserror replacing {push_files}: exit status 128
Steps to reproduce
Here's the relevant sections my
lefthook.yaml
file:Contents of
shellscheck.sh
though I'm sure it doesn't matter because it happens no matter what I use but adding for completeness sake:Expected results
I expect it to not error? lol. I know the file i'm testing should cause an error to return from my script. I've also tried other scripts in the
run
directive and the same results.. anytime I reference the{push_files}
I get that same error.Actual results
I make adjustments to a
*.sh
file and when I try to push up the change to remote up I get the error [snipped branch name details]:Possible Solution
🤷🏻
The text was updated successfully, but these errors were encountered: