Closed calebcartwright closed 4 years ago
For anyone interested in working on this, a couple recent PRs have made it really simple to deliver this feature with a small final amount of work.
Basically, we just need to change the final arg from None
to an option-wrapped HashMap reference that uses RUSTY_HOOK_GIT_PARAMS
for the key and the value would be the args
parameter in the run
function (currently _args
because it's not used yet).
Could also consider tweaking the cli to keep the Option<String>
and passing that along to run
, and conditionally set the value passed to run_command
based on whether args
is None or Some, with None and the HashMap respectively
https://github.com/swellaby/rusty-hook/blob/755cd4477d141cebc084186ebc4c33828caba604/src/main.rs#L74 https://github.com/swellaby/rusty-hook/blob/755cd4477d141cebc084186ebc4c33828caba604/src/main.rs#L47
Description
rusty-hook
should take the git params and expose them as an environment variableValue
This would make those git params accessible to the downstream tools/scripts that are invoked by
rusty-hook