syntaqx / git-hooks

A collection of git hooks for use with pre-commit
MIT License
34 stars 17 forks source link

shfmt hook fail bug #5

Open dkolepp opened 4 years ago

dkolepp commented 4 years ago

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.

syntaqx commented 3 years ago

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