From 88cc493e09a66a690429beb7e1bd1c6968e7bdfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 21 Sep 2024 15:53:22 +0900 Subject: [PATCH 1/3] fix: stdin is not a tty error in husky --- .husky/common.sh | 9 +++++++++ .husky/pre-commit | 1 + 2 files changed, 10 insertions(+) create mode 100644 .husky/common.sh diff --git a/.husky/common.sh b/.husky/common.sh new file mode 100644 index 000000000..e9cd1b87b --- /dev/null +++ b/.husky/common.sh @@ -0,0 +1,9 @@ +#!/bin/sh +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 \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index dc0378c34..58a97a45d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/common.sh" yarn lint-staged \ No newline at end of file From 2d7b8be52157f0fe53e03944dc3fbe1693fa0346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sun, 22 Sep 2024 15:47:30 +0900 Subject: [PATCH 2/3] Update pre-commit --- .husky/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 58a97a45d..eb6e8c1c0 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,4 @@ . "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/common.sh" -yarn lint-staged \ No newline at end of file +yarn lint-staged From 2e308724e563b1b97d8feea7f13ea338b770c7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sun, 22 Sep 2024 15:47:59 +0900 Subject: [PATCH 3/3] Update common.sh --- .husky/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/common.sh b/.husky/common.sh index e9cd1b87b..5eccc3888 100644 --- a/.husky/common.sh +++ b/.husky/common.sh @@ -6,4 +6,4 @@ command_exists () { # Windows 10, Git Bash and Yarn workaround if command_exists winpty && test -t 1; then exec < /dev/tty -fi \ No newline at end of file +fi