From 5f5478956b2a6688af6e66790b10e08c5265471a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Mon, 31 Jul 2023 00:47:00 +0200 Subject: [PATCH] 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: 7f1b13923fda8f23e82a9972e776ed4d61044341 --- update_requirements.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/update_requirements.sh b/update_requirements.sh index b2b36e7097..f9c8ddf64c 100755 --- a/update_requirements.sh +++ b/update_requirements.sh @@ -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