diff --git a/ui/.husky/pre-commit b/ui/.husky/pre-commit index 98be29c453..0755cd1872 100755 --- a/ui/.husky/pre-commit +++ b/ui/.husky/pre-commit @@ -6,6 +6,12 @@ set -e +# The Python pre-commit framework (see .pre-commit-config.yaml, hook "ui-checks") +# exports GIT_WORK_TREE, GIT_DIR, and GIT_INDEX_FILE pointing to its temp staging +# area. Unset them so git commands below resolve against the real repo and index. +# See: https://github.com/prowler-cloud/prowler/pull/10574 +unset GIT_WORK_TREE GIT_DIR GIT_INDEX_FILE GIT_PREFIX GIT_COMMON_DIR GIT_OBJECT_DIRECTORY + # Colors RED='\033[0;31m' GREEN='\033[0;32m'