chore(ui): unset GIT_WORK_TREE in pre-commit hook (#10574)

Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pablo Fernandez Guerra (PFE)
2026-04-08 14:27:12 +02:00
committed by GitHub
co-authored by Pablo F.G Claude Opus 4.6
parent bc38104903
commit 406eedd68a
+6
View File
@@ -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'