1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kresus_ynh.git synced 2024-09-03 19:36:10 +02:00

Try ynh_use_nodejs without subshell

This commit is contained in:
Nicolas Frandeboeuf 2023-07-07 16:37:11 +02:00
parent d39591fabc
commit af7cfdff8a
2 changed files with 7 additions and 8 deletions

View file

@ -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_script_progression --message="Installing app..." --weight=1
pushd "$final_path"
ynh_use_nodejs ynh_use_nodejs
(
cd "$final_path"
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 install --production
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean --all 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/.cache"
ynh_secure_remove --file="$final_path/.yarn" ynh_secure_remove --file="$final_path/.yarn"
) popd
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION

View file

@ -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_script_progression --message="Installing app..." --weight=1
pushd "$final_path"
ynh_use_nodejs ynh_use_nodejs
(
cd "$final_path"
# In case of nodejs upgrade, remove the current node_modules to make sure there are no errors # 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. # 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_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/.cache"
ynh_secure_remove --file="$final_path/.yarn" ynh_secure_remove --file="$final_path/.yarn"
) popd
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE