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!)"