From ace6917c7d969477701dcd9a50c7d128a448afa2 Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Sun, 17 Sep 2017 12:30:36 +0100 Subject: [PATCH] #42: Clear caches before updating Composer --- public/update.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/public/update.php b/public/update.php index bf7567b..cc6346c 100644 --- a/public/update.php +++ b/public/update.php @@ -100,7 +100,25 @@ php artisan clear-compiled echo nl2br($result); if ($rc != 0) { - $this->echoError('Updating Composer packages failed'); + $this->echoError('clear-compiled command failed'); + return false; + } + + system('php artisan cache:clear', $rc); + $result = ob_get_clean(); + echo nl2br($result); + if ($rc != 0) + { + $this->echoError('cache:clear command failed'); + return false; + } + + system('php artisan view:clear', $rc); + $result = ob_get_clean(); + echo nl2br($result); + if ($rc != 0) + { + $this->echoError('view:clear command failed'); return false; }