From 1884cd0f90c8c291e59616c5727c81c024338706 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 8 Aug 2023 22:31:05 +0200 Subject: [PATCH] Fix upgrade from 0.0.1.2022.06.03~ynh1 --- scripts/install | 6 +++--- scripts/upgrade | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 4895382..f81fb89 100644 --- a/scripts/install +++ b/scripts/install @@ -115,9 +115,9 @@ ynh_script_progression --message="Building..." pushd "$final_path" ynh_exec_as $app git submodule update --init --recursive ynh_use_nodejs - yarn install --pure-lockfile - mkdir "$final_path/dist" - $ynh_npm run build + ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile + ynh_exec_as $app mkdir -p "$final_path/dist" + ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 098b184..bd5dd2f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,6 +63,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Fix upgrade from 0.0.1.2022.06.03~ynh1 +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # CREATE DEDICATED USER #================================================= @@ -121,8 +126,9 @@ ynh_script_progression --message="Building..." pushd "$final_path" ynh_exec_as $app git submodule update --init --recursive ynh_use_nodejs - yarn install --pure-lockfile - $ynh_npm run build + ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile + ynh_exec_as $app mkdir -p "$final_path/dist" + ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build popd #=================================================