Closed getsnoopy closed 7 years ago
I added an extra test in there that checks to see if everything works properly even if no input is passed in via STDIN.
Sorry for delay.
I was thinking about this pr. It makes the tool more complicated and even fragile because of async behavior. So, I decided to decline supporting such feature for a while.
Thank you for your help and your time. I very appreciate that and sorry for bad news : - /
Hey @tarmolov, I'm wondering how you feel about this feature now. We really need this, since we need the hook scripts to be able to see where commits are being pushed in the pre-push
hook for example. There's no alternative to it at the moment.
@tarmolov, any update on this?
Nothing was changed since https://github.com/tarmolov/git-hooks-js/pull/28#issuecomment-259950000
However, maybe husky
works better for you. It is supported GIT_STDIN
variable which you're looking for.
https://github.com/typicode/husky/pull/253
Thanks, I'll look into it.
Some git hooks can be passed additional information through standard input (e.g., the pre-push hook), so this commit handles that properly. Since stream data can be consumed only once but multiple hooks may need to use it, capture the stream data once and pipe it to each child process individually.
Fixes #26