Skip to content

Commit d79a3a4

Browse files
author
Alexander Abroskin
committed
fix for non interactive shell in IDE
1 parent d9cd520 commit d79a3a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/add.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ if [ "$LEFTHOOK" = "0" ]; then
6565
exit 0
6666
fi
6767
68-
exec < /dev/tty # <- enables interactive shell
68+
if [ -t 1 ] ; then
69+
exec < /dev/tty ; # <- enables interactive shell
70+
fi
6971
7072
` + autoInstall(hookName, fs) + "\n" + "cmd=\"lefthook run " + hookName + " $@\"" +
7173
`

0 commit comments

Comments
 (0)