-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDonlSync
More file actions
34 lines (26 loc) · 814 Bytes
/
DonlSync
File metadata and controls
34 lines (26 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env php
<?php
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(E_ALL);
require __DIR__ . '/vendor/autoload.php';
use DonlSync\Command\CommandFactory;
use Symfony\Component\Console\Application;
use Symfony\Component\Dotenv\Dotenv;
try {
if (is_readable(__DIR__ . '/.env')) {
$dotenv = new Dotenv(false);
$dotenv->load(__DIR__ . '/.env');
}
$application = new Application();
$application->setName($_ENV['APPLICATION_NAME']);
$application->addCommands(CommandFactory::getCommands());
$application->setCatchExceptions(true);
$application->run();
return 0;
} catch (Throwable $t) {
echo 'Uncaught throwable';
echo ' Message: ' . $t->getMessage();
echo ' Trace: ' . $t->getTraceAsString();
return 1;
}