Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(pre-commit): Hooks should use the copywrite binary #120

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bhundven
Copy link

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

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 hashicorp#78

Signed-off-by: Bryan Hundven <[email protected]>
@bhundven bhundven requested a review from a team as a code owner February 22, 2025 03:58
@bhundven
Copy link
Author

bhundven commented Feb 22, 2025

I'm happy to drop the additional_dependencies commit. It's why I made it a second commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-commit installation fails
1 participant