Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Commit

Permalink
Fix issue where Batect would fail with "stdin is not a tty" when runn…
Browse files Browse the repository at this point in the history
…ing in a Git hook on Windows.

Resolves #945.
  • Loading branch information
charleskorn committed Aug 1, 2021
1 parent 86c6685 commit d3e8cf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrapper/unix/src/template.sh
Expand Up @@ -83,7 +83,7 @@
JAVA_OPTS=()
fi

if [[ "$(uname -o 2>&1)" == "Msys" ]] && hash winpty 2>/dev/null; then
if [[ "$(uname -o 2>&1)" == "Msys" ]] && hash winpty 2>/dev/null && [ -t /dev/stdin ]; then
GIT_BASH_PTY_WORKAROUND=(winpty)
else
GIT_BASH_PTY_WORKAROUND=()
Expand Down

0 comments on commit d3e8cf2

Please sign in to comment.