Skip to content

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.

@Paillat-dev
Copy link

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

image

@bhundven
Copy link
Author

bhundven commented Jun 8, 2025

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!

@bhundven
Copy link
Author

bhundven commented Jun 8, 2025

#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!

@mallikabandaru
Copy link

@mukeshjc Could you please review this. Thank you.

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
3 participants