diff --git a/scripts/install b/scripts/install index c95b6ee..90aea9d 100644 --- a/scripts/install +++ b/scripts/install @@ -158,14 +158,14 @@ ynh_exec_as $app virtualenv --python=python3 --system-site-packages "${final_pat #================================================= ynh_script_progression --message="Installing app..." --weight=1 -ynh_use_nodejs -( - cd "$final_path" +pushd "$final_path" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean --all ynh_secure_remove --file="$final_path/.cache" ynh_secure_remove --file="$final_path/.yarn" -) +popd #================================================= # ADD A CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 6e2d3bd..a36109b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -189,9 +189,8 @@ ynh_exec_as $app virtualenv --python=python3 --system-site-packages "${final_pat #================================================= ynh_script_progression --message="Installing app..." --weight=1 -ynh_use_nodejs -( - cd "$final_path" +pushd "$final_path" + ynh_use_nodejs # In case of nodejs upgrade, remove the current node_modules to make sure there are no errors # linked to modules compiled for the previous version. @@ -201,7 +200,7 @@ ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean --all ynh_secure_remove --file="$final_path/.cache" ynh_secure_remove --file="$final_path/.yarn" -) +popd #================================================= # UPDATE A CONFIG FILE