From 269739dbe1e8311bb033377daeed6bb7c3486a5a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 5 Mar 2021 22:26:12 +0100 Subject: [PATCH] Enhanced ynh_intall_pyhton --- scripts/ynh_install_python | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/ynh_install_python b/scripts/ynh_install_python index aa5d286..052a30c 100644 --- a/scripts/ynh_install_python +++ b/scripts/ynh_install_python @@ -99,8 +99,9 @@ ynh_use_python () { if [[ :$PATH: != *":$python_path"* ]]; then PATH="$python_path:$PATH" fi + python_path="$PATH" # Create an alias to easily load the PATH - ynh_python_load_path="PATH=$PATH" + ynh_python_load_path="PATH=$python_path" # Sets the local application-specific Python version (cd $final_path @@ -175,7 +176,7 @@ ynh_install_python () { pyenv install --skip-existing $python_version &>/dev/null # Remove app virtualenv - if $(pyenv virtualenvs | grep $YNH_APP_INSTANCE_NAME) + if `pyenv virtualenvs | grep "$YNH_APP_INSTANCE_NAME " 1>/dev/null 2>&1` then pyenv virtualenv-delete --force $YNH_APP_INSTANCE_NAME fi