From c01ef43565fcdab686add8793a9759da96e2ce04 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 10 Jul 2022 12:29:31 +0200 Subject: [PATCH] Set Hyde base path using dirname instead of getcwd Fixes https://github.com/hydephp/develop/issues/212 --- app/bootstrap.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/bootstrap.php b/app/bootstrap.php index 27dda0ab10b..6cb24d62de7 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -43,9 +43,14 @@ | | Next, we need to configure Hyde to use our project's base path. | +| There are two ways we can do this, previously we were using getcwd(), +| which allows for a lot of flexibility, but can also cause problems. +| See this issue: https://github.com/hydephp/develop/issues/212 +| */ -\Hyde\Framework\Hyde::setBasePath(getcwd()); +// @deprecated usage \Hyde\Framework\Hyde::setBasePath(getcwd()); +\Hyde\Framework\Hyde::setBasePath(dirname(__DIR__)); /* |--------------------------------------------------------------------------