From b60691e6f30382c288606f8859b1ccd7eefa8f81 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 10 Aug 2019 14:46:34 +0200 Subject: [PATCH] Fix scope of exec_occ function --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8e75255..320381e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -176,16 +176,16 @@ ynh_install_app_dependencies $pkg_dependencies # VERSION TO THE NEXT ONE #================================================= +# Define a function to execute commands with `occ` +exec_occ() { +(cd "$final_path" && exec_as "$app" \ + php occ --no-interaction --no-ansi "$@") +} + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading nextcloud..." --weight=3 - # Define a function to execute commands with `occ` - exec_occ() { - (cd "$final_path" && exec_as "$app" \ - php occ --no-interaction --no-ansi "$@") - } - # Load the last available version source upgrade.d/upgrade.last.sh last_version=$next_version