Skip to content

Commit

Permalink
try workaround for husky error: typicode/husky#850
Browse files Browse the repository at this point in the history
  • Loading branch information
j0Shi82 committed Sep 30, 2021
1 parent 9423887 commit b3c63ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .husky/common.sh
@@ -0,0 +1,8 @@
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
1 change: 1 addition & 0 deletions .husky/pre-commit
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .husky/pre-push
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn test

0 comments on commit b3c63ba

Please sign in to comment.