git-hooks icon indicating copy to clipboard operation
git-hooks copied to clipboard

shfmt hook fail bug

Open dkolepp opened this issue 5 years ago • 1 comments

I used the shfmt hook, and it flagged my files as "failing". I believe this is due to the presence of "output of any kind" - when running: shfmt -l .

However, I have SELinux enabled, and the only output from this command was:

2020/04/10 12:15:25.715497 cmd_run.go:375: restoring default SELinux context of /home/myuser/snap

When I run the suggested "diff", there is no difference. [There is output - but again, a message about restoring the SELinux context.

Note: I have shfmt installed as a snap app.

dkolepp avatar Apr 10 '20 16:04 dkolepp

Feel free to send a PR if changing the hook fixes your issue, I'm not able to reproduce this.

syntaqx avatar Sep 25 '20 07:09 syntaqx