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
008f3fd45f
commit
bff5b94ff0
@ -52,21 +52,29 @@ class PostUpdate extends Command
|
|||||||
info("I wasn't able to migrate the data.");
|
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 {
|
try {
|
||||||
Artisan::call('optimize');
|
Artisan::call('optimize');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
info("I wasn't able to optimize.");
|
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 */
|
/* 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();
|
VersionCheck::dispatch();
|
||||||
|
|
||||||
echo "Done.";
|
echo "Done.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user