Skip to content

Commit

Permalink
use getcwd for rootpath
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Dec 18, 2024
1 parent 84881c0 commit 2a6ff08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/N98/MagerunBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public static function createApplication(?ClassLoader $classLoader = null): Appl
*/
public static function getLoader(): ClassLoader
{
$projectBasedir = __DIR__ . '/../..';
if (!($loader = self::includeIfExists($projectBasedir . '/vendor/autoload.php')) instanceof \Composer\Autoload\ClassLoader
&& !($loader = self::includeIfExists($projectBasedir . '/../../autoload.php')) instanceof \Composer\Autoload\ClassLoader
$projectBasedir = getcwd();
if (!($loader = self::includeIfExists($projectBasedir . '/vendor/autoload.php')) instanceof ClassLoader
&& !($loader = self::includeIfExists($projectBasedir . '/../../autoload.php')) instanceof ClassLoader
) {
throw new ErrorException(
'You must set up the project dependencies, run the following commands:' . PHP_EOL .
Expand Down

0 comments on commit 2a6ff08

Please sign in to comment.