update_requirements: fix opendbc pre-commit hook installation (#29175)

Force poetry to stay in the same venv when installing pre-commit hooks
This commit is contained in:
Kacper Rączy
2023-07-31 00:47:00 +02:00
committed by GitHub
parent 2fd6310352
commit 7f1b13923f
+2 -3
View File
@@ -75,9 +75,8 @@ if [ "$(uname)" != "Darwin" ]; then
echo "pre-commit hooks install..."
shopt -s nullglob
for f in .pre-commit-config.yaml */.pre-commit-config.yaml; do
cd $DIR/$(dirname $f)
if [ -e ".git" ]; then
$RUN pre-commit install
if [ -e "$DIR/$(dirname $f)/.git" ]; then
$RUN pre-commit install -c "$f"
fi
done
fi