From 1beeae5e1f26a862b0737d9e1fb1d0738bf1547d Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 18 Aug 2021 12:44:55 -0600 Subject: [PATCH] upgrade: put panel into maintenance mode before writing files --- app/Console/Commands/UpgradeCommand.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/UpgradeCommand.php b/app/Console/Commands/UpgradeCommand.php index feb21ec6..428a13a7 100644 --- a/app/Console/Commands/UpgradeCommand.php +++ b/app/Console/Commands/UpgradeCommand.php @@ -94,6 +94,11 @@ class UpgradeCommand extends Command $bar = $this->output->createProgressBar($skipDownload ? 9 : 10); $bar->start(); + $this->withProgress($bar, function () { + $this->line('$upgrader> php artisan down'); + $this->call('down'); + }); + if (!$skipDownload) { $this->withProgress($bar, function () { $this->line("\$upgrader> curl -L \"{$this->getUrl()}\" | tar -xzv"); @@ -104,11 +109,6 @@ class UpgradeCommand extends Command }); } - $this->withProgress($bar, function () { - $this->line('$upgrader> php artisan down'); - $this->call('down'); - }); - $this->withProgress($bar, function () { $this->line('$upgrader> chmod -R 755 storage bootstrap/cache'); $process = new Process(['chmod', '-R', '755', 'storage', 'bootstrap/cache']);