1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Merge pull request #4500 from turbo124/v5-develop

Better error handling with self updater
This commit is contained in:
David Bomba 2020-12-16 07:37:50 +11:00 committed by GitHub
commit 4e8b5576ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ use Composer\Console\Application;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
class PostUpdate extends Command
{
@ -57,10 +58,11 @@ class PostUpdate extends Command
$input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']);
$application = new Application();
$application->setAutoExit(false);
$output = new BufferedOutput();
$application->run($input, $output);
info(print_r($output->fetch(),1));
try {
Artisan::call('optimize');
} catch (\Exception $e) {