From d33c92307f3535f07ad0e1882aaaffed89970b8c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 5 Jun 2020 13:45:08 +0200 Subject: [PATCH] Fix upgrade --- scripts/upgrade | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 30b2351..b62a79e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,11 +137,13 @@ export PATH="$final_path/.composer/vendor/bin:$PATH" update-alternatives --set php /usr/bin/php$phpversion -ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1 -ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all -ynh_exec_as $app env PATH=$PATH drush @$app pm-update -y drupal -ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all -ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0 +pushd "$final_path" + ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1 + ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all + ynh_exec_as $app env PATH=$PATH drush @$app pm-update -y drupal + ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all + ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0 +popd update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}