diff --git a/.husky/post-checkout b/.husky/post-checkout index 1a255d835d..8d4a054e93 100755 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -1,5 +1,7 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -. "$(dirname "$0")/common.sh" +. "$(dirname "$0")/../mailpoet/.env" +[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0 +. "$(dirname "$0")/common.sh" installIfUpdates diff --git a/.husky/post-merge b/.husky/post-merge index 1a255d835d..0b82080ef8 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -1,5 +1,8 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/../mailpoet/.env" +[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0 + . "$(dirname "$0")/common.sh" installIfUpdates diff --git a/.husky/post-rewrite b/.husky/post-rewrite index 1a255d835d..0b82080ef8 100755 --- a/.husky/post-rewrite +++ b/.husky/post-rewrite @@ -1,5 +1,8 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/../mailpoet/.env" +[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0 + . "$(dirname "$0")/common.sh" installIfUpdates diff --git a/.husky/pre-commit b/.husky/pre-commit index ac4279c93a..293ab1cba4 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,7 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/../mailpoet/.env" +[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0 npx lint-staged -c mailpoet/package.json --cwd mailpoet npx lint-staged -c package.json