Skip to content
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

How about appending the file contents instead of replacing them? #115

Open
chouchouji opened this issue Oct 12, 2024 · 2 comments · May be fixed by #118
Open

How about appending the file contents instead of replacing them? #115

chouchouji opened this issue Oct 12, 2024 · 2 comments · May be fixed by #118

Comments

@chouchouji
Copy link

chouchouji commented Oct 12, 2024

Reason

I set some commands in commit-msg hook by myself. When I use this package, it will rewrite commit-msg file if I set that hook.

Suggestion

How about replacing writeFileSync with appendFileSync?

Code

The source code position is https://github.com/toplenboren/simple-git-hooks/blob/master/simple-git-hooks.js#L204

image

image

@toplenboren
Copy link
Owner

Hello! Thanks for the issue

We can add this as option, maybe configured via environment variable.. Feel free to drop a PR 👍

@chouchouji chouchouji linked a pull request Feb 21, 2025 that will close this issue
@chouchouji
Copy link
Author

Hello! Thanks for the issue

We can add this as option, maybe configured via environment variable.. Feel free to drop a PR 👍

Thanks for your reply. I had dropped a pr. Please review it when you have time.

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 a pull request may close this issue.

2 participants