From 814cd02abd456007fb1c98e96cdc70d6a1d8dcca Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 26 Sep 2022 23:24:42 +0200 Subject: [PATCH] =?UTF-8?q?Make=20sure=20final=5Fpath=20is=20a=20git=20rep?= =?UTF-8?q?o=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4c0b937..dadbc73 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,11 +63,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -# Make the final_path a git repo if needed -if [ ! -d "$final_path/.git" ]; then - git init "$final_path" -q -fi - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -180,6 +175,11 @@ chown $app:$app "$final_path/.yarnrc.yml" # BUILD GHOST #============================================== +# Make the final_path a git repo if needed +if [ ! -d "$final_path/.git" ]; then + ynh_exec_as $app git init "$final_path" -q +fi + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building Ghost... (this will take some time and resources!)"