diff --git a/kafka-ui-react-app/.husky/pre-commit b/kafka-ui-react-app/.husky/pre-commit index 0664e92c6fa13bee4b3cde185c847287db8f5e6d..b10cf37b9c27032ca6cf58c12e502153c4165fa7 100755 --- a/kafka-ui-react-app/.husky/pre-commit +++ b/kafka-ui-react-app/.husky/pre-commit @@ -1,4 +1,11 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -cd kafka-ui-react-app && npm run pre-commit + +if git diff --cached --name-only | grep --quiet "kafka-ui-react-app" +then + cd kafka-ui-react-app && npm run pre-commit +else + echo "Skipping frontend tests" + exit 0 +fi