From 4c1d3398f50f08dec77f32507a6164469fabe0a8 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Tue, 26 Jul 2022 21:13:04 +0200 Subject: [PATCH] finally use ynh_secure_remove correctly --- scripts/upgrade | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 50b56fb..0d98727 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,9 +133,15 @@ ynh_script_progression --message="Upgrading the database..." pushd "$final_path" # Clear caches # https://github.com/invoiceninja/invoiceninja/issues/7397 - ynh_secure_remove --file=bootstrap/cache/* - ynh_secure_remove --file=storage/framework/cache/* - ynh_secure_remove --file=storage/framework/sessions/* + ynh_secure_remove --file=$final_path/bootstrap/cache/ + ynh_secure_remove --file=$final_path/storage/framework/cache/ + ynh_secure_remove --file=$final_path/storage/framework/sessions/ + + mkdir -p $final_path/bootstrap/cache/ $final_path/storage/framework/cache/ $final_path/storage/framework/sessions/ + + # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) + php$phpversion artisan view:clear + php$phpversion artisan cache:clear # Run the database migrations php$phpversion artisan migrate --force --no-interaction --verbose