-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoctis
executable file
·34 lines (25 loc) · 1010 Bytes
/
octis
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
namespace Octo;
use Psy\Shell;
use Psy\Configuration;
ini_set('error_reporting', E_ALL);
ini_set('display_errors', true);
$ini = parse_ini_file(realpath(__DIR__) . '/.env');
defined('APPLICATION_ENV') || define('APPLICATION_ENV', isset($ini['APPLICATION_ENV']) ? $ini['APPLICATION_ENV'] : 'production');
defined('SITE_NAME') || define('SITE_NAME', isset($ini['SITE_NAME']) ? $ini['SITE_NAME'] : 'project');
require_once realpath(__DIR__) . '/vendor/autoload.php';
path("app", realpath(__DIR__ . '/app'));
path("base", realpath(__DIR__));
try {
systemBoot(realpath(__DIR__));
$app = (new Bootstrap())->cli();
$config = new Configuration([
'updateCheck' => 'never'
]);
$shell = new Shell($config);
$shell->run();
} catch (\Exception $e) {
dd($e);
Cli::show($e->getMessage() . ' === [' . $e->getFile() . ' ' . $e->getLine() . '] ===', 'ERROR');
}