From a6e9912a465ff2040411cf357f0ddad36311e0b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 11 Mar 2024 23:02:05 +0100 Subject: [PATCH] Cleanup venv also if path change --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fe1fa92..608ebc1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,7 +13,7 @@ postgresql_version="$(psql -V | cut -d' ' -f3 | cut -d. -f1)" install_source() { # Clean venv is it was on python with an old version in case major upgrade of debian - if [ ! -e $install_dir/venv/lib/python$python_version ]; then + if [ ! -e $install_dir/venv/lib/python$python_version ] || ! grep -qF "$install_dir/venv/lib/python" "$install_dir"/venv/bin/pip; then ynh_secure_remove --file=$install_dir/venv/bin ynh_secure_remove --file=$install_dir/venv/lib ynh_secure_remove --file=$install_dir/venv/lib64