Skip to content

Commit 5b1f650

Browse files
authored
Merge pull request #69 from Nyholm/sub-dir
Allow deployments in sub directory
2 parents cce0757 + b2eb2f5 commit 5b1f650

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/HandlerResolver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter
108108
));
109109
}
110110

111-
$projectDir = getenv('LAMBDA_TASK_ROOT') ?: null;
112-
113111
// Use the Symfony Runtime component to resolve the closure and get the PSR-11 container
114112
$options = $_SERVER['APP_RUNTIME_OPTIONS'] ?? [];
115-
if ($projectDir) {
116-
$options['project_dir'] = $projectDir;
113+
if (! isset($options['project_dir'])) {
114+
$options['project_dir'] = dirname(__DIR__, 4);
117115
}
118116

119117
$runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? BrefRuntime::class;

0 commit comments

Comments
 (0)