From c51111fd99ecb5a4f53c8b97bd9c121808987bec Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 20 Jun 2022 20:13:50 +0200 Subject: [PATCH] Fix upgrade --- scripts/upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ebc43c0..81d8d8c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,10 +123,11 @@ then ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build popd tmpdir="$(mktemp -d)" - ynh_exec_as $app cp -af "$final_path/live/config.js" "$tmpdir/config.js" + cp -af "$final_path/live/config.js" "$tmpdir/config.js" ynh_secure_remove --file="$final_path/live" - ynh_exec_as $app mv "$final_path/build/dist" "$final_path/live" - ynh_exec_as $app cp -af "$tmpdir/config.js" "$final_path/live/config.js" + mv "$final_path/build/dist" "$final_path/live" + cp -af "$tmpdir/config.js" "$final_path/live/config.js" + ynh_secure_remove --file="$tmpdir" fi chmod 750 "$final_path"