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

Force poetry to stay in the same venv when installing pre-commit hooks
old-commit-hash: 7f1b13923f
This commit is contained in:
Kacper Rączy 2023-07-31 00:47:00 +02:00 committed by GitHub
parent b07e2bdb4a
commit 5f5478956b
1 changed files with 2 additions and 3 deletions

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