Closed Absolucy closed 3 years ago
Thanks for the question @aspenluxxxy! This isn't readily available at the moment unfortunately.
Git hook utilities that follow the approach rusty-hook does don't want to just tack on git args to the configured hook script because in many/most cases that'd cause errors (you wouldn't want to throw git args at cargo check
or cargo clippy
for example). Instead, it's common for the git args to be made available as an environment variable (node/npm's husky for example uses HUSKY_GIT_PARAMS), which your hook scripts/tools/etc. can than leverage.
Making the git params available as an env is being tracked under #25 if you'd like to track that issue.
Ah, I was wondering if there was a way to use a replace (like having {ARGS}
in the command)
I may try to contribute :+1:
I may try to contribute +1
That would be fantastic thank you! There's one minor update I need to make to a lib rusty-hook uses, but after that the changes needed here should be pretty straightforward. The actual git hook files are already passing the git args to the rusty-hook cli, it's just that rusty-hook isn't doing anything with them yet :laughing:
Question Hi, I'm trying to use rusty-hook to enforce conventional commit messages, using the
commit-msg
hook. However, it doesn't seem to pass the git args to my script?