From d2ed6222b81ee2803254d9ad207250b13c38e7f0 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 23 Jun 2023 13:53:36 +0200 Subject: [PATCH 1/3] Fix upgrade --- scripts/_common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1bca725..dc2d313 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -145,6 +145,7 @@ myynh_install_homeassistant () { # Upgrade the virtual environment directory myynh_upgrade_venv_directory () { + find "$install_dir/bin/" -type l -name 'python*' -exec bash -c 'ynh_secure_remove "$1"' _ {} \; ynh_exec_as $app $py_app_version -m venv --upgrade "$install_dir" } From f9246d9e46013e78abede9ad38c29f04c9abc916 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 23 Jun 2023 14:36:19 +0200 Subject: [PATCH 2/3] Fix upgrade --- scripts/_common.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index dc2d313..d3f60e4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -145,7 +145,14 @@ myynh_install_homeassistant () { # Upgrade the virtual environment directory myynh_upgrade_venv_directory () { - find "$install_dir/bin/" -type l -name 'python*' -exec bash -c 'ynh_secure_remove "$1"' _ {} \; + + # Remove old python links before recreating them + for i in `find "$install_dir/bin/" -type l -name 'python*'` + do + ynh_secure_remove --file="$i" + done + + # Upgrade the virtual environment directory ynh_exec_as $app $py_app_version -m venv --upgrade "$install_dir" } From efd6abaf993cabae76431330114968c44caef164 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 23 Jun 2023 15:06:04 +0200 Subject: [PATCH 3/3] Fix upgrade --- scripts/_common.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d3f60e4..407873b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -147,10 +147,7 @@ myynh_install_homeassistant () { myynh_upgrade_venv_directory () { # Remove old python links before recreating them - for i in `find "$install_dir/bin/" -type l -name 'python*'` - do - ynh_secure_remove --file="$i" - done + find "$install_dir/bin/" -type l -name 'python*' -exec bash -c 'rm -f "$1"' _ {} \; # Upgrade the virtual environment directory ynh_exec_as $app $py_app_version -m venv --upgrade "$install_dir"