Komondor
Komondor copied to clipboard
Komondor blocking user-interactivity?
Hello, I believe I have a potential bug report or just a general question.
I'm trying to have a pre-commit
hook that is interactive, here is a basic example:
#!/bin/sh
exec </dev/tty
while read -p "Looks like you are committing directly to master, are you sure you want to continue? (Y/n) " yn; do
case $yn in
[Yy]) break ;;
[Nn])
echo "Good call. Make a new branch."
exit 1
;;
*) echo "Please answer y (yes) or n (no):" && continue ;;
esac
done
exec <&-
Anyways. This script works fine when entered manually to .git/hooks/pre-commit
, but does not work correctly when using Komondor. It doesn't display any message, and does not respond to any text:
> ./bin/verify-commit
Please let me know if there's a workaround to this issue.
Yeah, that sounds like a bug 👍 - I'd look to see if the process Komondor opens to run the shell includes STDIN
Looks like Komondor is using ShellOut to handle that. Seems like it could be an issue with that library?
Looks like no-one has ever asked about it:https://github.com/JohnSundell/ShellOut/issues?utf8=✓&q=stdin+
Could either move the useful bits into Komondor, or add stdin support to shellout