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}