diff --git a/tools/install_python_dependencies.sh b/tools/install_python_dependencies.sh index 6753afffb9..f7ba316480 100755 --- a/tools/install_python_dependencies.sh +++ b/tools/install_python_dependencies.sh @@ -75,12 +75,8 @@ pyenv rehash [ -n "$POETRY_VIRTUALENVS_CREATE" ] && RUN="" || RUN="poetry run" -if [ "$(uname)" != "Darwin" ]; then +if [ "$(uname)" != "Darwin" ] && [ -e "$ROOT/.git" ]; then echo "pre-commit hooks install..." - shopt -s nullglob - for f in .pre-commit-config.yaml */.pre-commit-config.yaml; do - if [ -e "$ROOT/$(dirname $f)/.git" ]; then - $RUN pre-commit install -c "$f" - fi - done + $RUN pre-commit install + $RUN git submodule foreach pre-commit install fi