diff --git a/scripts/_common.sh b/scripts/_common.sh index 244e91a..8f1b84e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -42,11 +42,11 @@ myynh_setup_python_venv() { # Always recreate everything fresh with current python version ynh_secure_remove "$data_dir/venv" - # Skip pip because of: https://github.com/YunoHost/issues/issues/1960 - python3 -m venv --without-pip "$data_dir/venv" - chown -c -R "$app:" "$data_dir" + # Skip pip because of: https://github.com/YunoHost/issues/issues/1960 + ynh_exec_as $app python3 -m venv --without-pip "$data_dir/venv" + # run source in a 'sub shell' ( set +o nounset @@ -126,4 +126,3 @@ ynh_redis_remove_db() { local db=$1 redis-cli -n "$db" flushall } -