Secure not to activate multiple venv in pre_commit hook (#51715)
parent
4722fdf465
commit
453da10b62
script
|
@ -15,6 +15,7 @@ my_path=$(git rev-parse --show-toplevel)
|
|||
for venv in venv .venv .; do
|
||||
if [ -f "${my_path}/${venv}/bin/activate" ]; then
|
||||
. "${my_path}/${venv}/bin/activate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue