diff --git a/.husky/commit-msg b/.husky/commit-msg index ccfec39..b02e0a7 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,8 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx --no-install commitlint -e $GIT_PARAMS \ No newline at end of file +if [[ "$OS" == "Windows_NT" ]]; then + npx.cmd --no-install commitlint -e $GIT_PARAMS +else + npx --no-install commitlint -e $GIT_PARAMS +fi diff --git a/.husky/pre-commit b/.husky/pre-commit index c37466e..11709a7 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,8 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lint-staged \ No newline at end of file +if [[ "$OS" == "Windows_NT" ]]; then + npx.cmd lint-staged +else + npx lint-staged +fi diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 6720567..ab3a6e8 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -3,4 +3,8 @@ [ -n "$CI" ] && exit 0 . "$(dirname "$0")/_/husky.sh" -exec < /dev/tty && npx git-cz --hook || true \ No newline at end of file +if [[ "$OS" == "Windows_NT" ]]; then + exec < /dev/tty && npx.cmd git-cz --hook || true +else + exec < /dev/tty && npx git-cz --hook || true +fi