-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v5 stdin is not a tty #850
Comments
Hi @jdanil, FWIW right now trying on Linux (I'll try on Windows later) and can't reproduce:
|
Could you try running |
Hi @typicode. Thanks for looking into this. I tried it on macOS too btw, and didn't have any issues there. I ran Let me know if I can provide any extra debugging information or test out changes if you don't have a Windows environment handy. I tried running with the
|
I remember this issue. I think it's related to yarnpkg/yarn#2998 Here's a workaround for husky 5 + Yarn on Windows, create command_exists () {
command -v "$1" >/dev/null 2>&1
}
# Windows 10, Git Bash and Yarn workaround
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi Source it in #!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"
yarn ... It doesn't seem to be necessary in places where just I'll update docs. |
Can confirm that unblocked the pre-push hook. Thanks @typicode! If anyone is looking this up later, since the above branch has been deleted after merge, here is the pr for husky 5 migration for this yarn repo jdanil/skunkworks#1398. |
Same error in "husky": "^6.0.0" using yarn
pre-push
|
A teammate of mine is having this exact issue too, even after applying the workaround for husky 5 + Yarn on Windows fix
|
The
pre-push
command seems to be failing withstdin is not a tty
after migration to v5. This looks like a similar issue to #627.The error seems to occur in other shell environments as well, even when winpty isn't present.
Versions
An example to reproduce the error can be found here.
The text was updated successfully, but these errors were encountered: