Skip to content

Commit

Permalink
Add slash in the end of laravel home path when use realpath
Browse files Browse the repository at this point in the history
  • Loading branch information
alustau committed Nov 13, 2023
1 parent cf8341c commit 96f216c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bref-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Bref\LaravelBridge\StorageDirectories;

Bref::beforeStartup(static function () {
$laravelHome = resolveBootstrapLocation();
$laravelHome = resolveLaravelHome();

if (! defined('STDERR')) {
define('STDERR', fopen('php://stderr', 'wb'));
Expand Down Expand Up @@ -51,7 +51,7 @@

Bref::setContainer(static fn() => new HandlerResolver);

function resolveBootstrapLocation(): string
function resolveLaravelHome(): string
{
$laravelHome = $_SERVER['LAMBDA_TASK_ROOT'] . '/bootstrap/cache/config.php';

Expand All @@ -60,5 +60,5 @@ function resolveBootstrapLocation(): string
}

// Going up 4 directories will get us from `vendor/brefphp/laravel-bridge/src` to the Laravel root folder
return realpath(__DIR__ . '/../../../../');
return realpath(__DIR__ . '/../../../../') . '/';
}

0 comments on commit 96f216c

Please sign in to comment.