File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 2626class Kernel
2727{
2828 private const DEFAULT_ROUTER_FILE = '/src/Console/ConsoleRouter.php ' ;
29- public const CONFIG_FILE_PATH = __DIR__ . '/../../unitary.config ' ;
29+ public const UNITARY_DIR = __DIR__ . '/../../ ' ;
30+ public const DEFAULT_CONFIG_FILE_PATH = __DIR__ . '/../../unitary.config ' ;
3031
3132 private ContainerInterface $ container ;
3233 private array $ userMiddlewares ;
@@ -47,7 +48,13 @@ public function __construct(
4748 $ this ->container = $ container ;
4849 $ this ->userMiddlewares = $ userMiddlewares ;
4950 $ this ->config = $ dispatchConfig ;
50- EmitronKernel::setConfigFilePath (self ::CONFIG_FILE_PATH );
51+
52+ if (is_file (self ::UNITARY_DIR . '/../../../unitary.config.php ' )) {
53+ EmitronKernel::setConfigFilePath (self ::UNITARY_DIR . '/../../../unitary.config ' );
54+ } else {
55+ EmitronKernel::setConfigFilePath (self ::DEFAULT_CONFIG_FILE_PATH );
56+ }
57+ EmitronKernel::setRouterFilePath (self ::UNITARY_DIR );
5158 }
5259
5360 /**
You can’t perform that action at this time.
0 commit comments