mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Better error handling with self updater
This commit is contained in:
parent
008f3fd45f
commit
bff5b94ff0
@ -52,21 +52,29 @@ class PostUpdate extends Command
|
||||
info("I wasn't able to migrate the data.");
|
||||
}
|
||||
|
||||
putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer');
|
||||
|
||||
$input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']);
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->run($input, $output);
|
||||
|
||||
info(print_r($output->fetch(),1));
|
||||
|
||||
try {
|
||||
Artisan::call('optimize');
|
||||
} catch (\Exception $e) {
|
||||
info("I wasn't able to optimize.");
|
||||
}
|
||||
|
||||
try {
|
||||
Artisan::call('view:clear');
|
||||
} catch (\Exception $e) {
|
||||
info("I wasn't able to clear the views.");
|
||||
}
|
||||
|
||||
/* For the following to work, the web user (www-data) must own all the directories */
|
||||
|
||||
putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer');
|
||||
|
||||
$input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']);
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->run($input);
|
||||
|
||||
VersionCheck::dispatch();
|
||||
|
||||
echo "Done.";
|
||||
|
Loading…
Reference in New Issue
Block a user