Skip to content

Commit

Permalink
Enable stdin if terminal (#415)
Browse files Browse the repository at this point in the history
Co-authored-by: Jess Telford <jess+github@jes.st>
Co-authored-by: Joel Gallant <joel@joelgallant.me>
Co-authored-by: Tan Li Hau <lhtan93@gmail.com>
Co-authored-by: ikokostya <ikokostya@gmail.com>
  • Loading branch information
5 people committed Dec 18, 2018
1 parent 73c0ad7 commit 2b5ac5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/installer/__tests__/__snapshots__/getScript.ts.snap
Expand Up @@ -29,6 +29,9 @@ if ! command -v node >/dev/null 2>&1; then
fi
if [ -f \\"$scriptPath\\" ]; then
if [ -t 1 ]; then
exec < /dev/tty
fi
if [ -f ~/.huskyrc ]; then
debug \\"source ~/.huskyrc\\"
source ~/.huskyrc
Expand Down Expand Up @@ -66,6 +69,9 @@ debug() {
debug \\"$hookName hook started...\\"
if [ -f \\"$scriptPath\\" ]; then
if [ -t 1 ]; then
exec < /dev/tty
fi
if [ -f ~/.huskyrc ]; then
debug \\"source ~/.huskyrc\\"
source ~/.huskyrc
Expand Down
3 changes: 3 additions & 0 deletions src/installer/getScript.ts
Expand Up @@ -64,6 +64,9 @@ fi
: ''
}
if [ -f "$scriptPath" ]; then
if [ -t 1 ]; then
exec < /dev/tty
fi
if [ -f ${huskyrc} ]; then
debug "source ${huskyrc}"
source ${huskyrc}
Expand Down

0 comments on commit 2b5ac5f

Please sign in to comment.