mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Better error handling with self updater
This commit is contained in:
parent
15489e2300
commit
5715f34086
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user