fix(pre-commit): Hooks should use the copywrite binary
If you use copywrite in your repo, you probably already have copywrite installed.
The hooks running go run . doesn't work in my terraform provider, because it is a plugin:
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically
exit status 1
So switch the entry point to be the copywrite program. Don't pass filenames. copywrite knows what to do.
Pass arguments directly on the entry.
Closes #78
I'm happy to drop the additional_dependencies commit. It's why I made it a second commit.
Could someone take a look at this ? Copywrite is currently unusable as pre-commit hook without this fix...
Also, @bhundven, the additional commit you made breaks pre-commit ci (see image below), idk if this is expected and something is required on my end.
Image
Also, @bhundven, the additional commit you made breaks pre-commit ci (see image below), idk if this is expected and something is required on my end.
@Paillat-dev I have removed the second commit. Thanks!
https://github.com/hashicorp/copywrite/pull/123 is related, and should be reviewed/merged at the same time. If you would rather have one PR for both, I could also update this PR.
@CalebAlbers Sorry to call out, but could we get a review of these? Massive thank you in advance!
@mukeshjc Could you please review this. Thank you.
Thanks for looking into this 🚀