From 2395b78db7a305d4cfd40f7afe0399c89cc4eee8 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 20 Jul 2015 23:38:31 +0200 Subject: [PATCH] issue with cli --- app/bootstrap.php.d/00-main.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/bootstrap.php.d/00-main.php b/app/bootstrap.php.d/00-main.php index 918614b..bdade45 100644 --- a/app/bootstrap.php.d/00-main.php +++ b/app/bootstrap.php.d/00-main.php @@ -6,4 +6,8 @@ $app = Application::getInstance(); $app['root_path'] = __DIR__ . '/../..'; -chdir($app['root_path']); +if (php_sapi_name() !== 'cli') { + chdir($app['root_path']); +} else { + set_include_path(get_include_path().PATH_SEPARATOR.$app['root_path']); +}