Originally created by @nneul on GitHub (Jan 21, 2016).
Right now, the way it's written, hooks can't do normal IO then get immediate EOF.
While it's straightforward enough to run under expect/whatever, would be nice if a simple read/prompt would work.
Originally created by @nneul on GitHub (Jan 21, 2016).
Right now, the way it's written, hooks can't do normal IO then get immediate EOF.
While it's straightforward enough to run under expect/whatever, would be nice if a simple read/prompt would work.
Hooks are just called as simple commands in the script with all data passed as arguments, there is no need to read from anywhere.
@lukas2511 commented on GitHub (Jan 22, 2016):
I actually have no idea what you are asking for.
Hooks are just called as simple commands in the script with all data passed as arguments, there is no need to read from anywhere.
In my case when testing, I was an interactive prompt in the hook (wasn't fully automated). With the way it's currently implemented, you can't read from stdin in the hook - you can only read from /dev/tty.
i.e. if you do "read x" in a hook shell script, it will immediately exit (as opposed to read x < /dev/tty which forces a read from the active terminal)
@nneul commented on GitHub (Jan 22, 2016):
In my case when testing, I was an interactive prompt in the hook (wasn't fully automated). With the way it's currently implemented, you can't read from stdin in the hook - you can only read from /dev/tty.
i.e. if you do "read x" in a hook shell script, it will immediately exit (as opposed to read x < /dev/tty which forces a read from the active terminal)
During the entire loop, stdin is captured. Have a pr coming.
@nneul commented on GitHub (Jan 22, 2016):
Found it. It's from this in command_sign_domains:
```
<"${DOMAINS_TXT}" _sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' -e 's/[[:space:]]+/ /g' | (grep -vE '^(#|$)' || true) | while read -r line; do
```
During the entire loop, stdin is captured. Have a pr coming.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @nneul on GitHub (Jan 21, 2016).
Right now, the way it's written, hooks can't do normal IO then get immediate EOF.
While it's straightforward enough to run under expect/whatever, would be nice if a simple read/prompt would work.
@lukas2511 commented on GitHub (Jan 22, 2016):
I actually have no idea what you are asking for.
Hooks are just called as simple commands in the script with all data passed as arguments, there is no need to read from anywhere.
@nneul commented on GitHub (Jan 22, 2016):
In my case when testing, I was an interactive prompt in the hook (wasn't fully automated). With the way it's currently implemented, you can't read from stdin in the hook - you can only read from /dev/tty.
i.e. if you do "read x" in a hook shell script, it will immediately exit (as opposed to read x < /dev/tty which forces a read from the active terminal)
@lukas2511 commented on GitHub (Jan 22, 2016):
I see what you mean, but I'm not entirely sure why this happens...
@nneul commented on GitHub (Jan 22, 2016):
Found it. It's from this in command_sign_domains:
During the entire loop, stdin is captured. Have a pr coming.
@nneul commented on GitHub (Jan 23, 2016):
What about this implementation #110