Skip to content

Commit 33dbd2e

Browse files
committed
Make use of Handler::lambda()
1 parent 2f2c343 commit 33dbd2e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/php/xp/lambda/RunLambda.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ public function run(): int {
4343
$environment= $_ENV + ['AWS_LAMBDA_FUNCTION_NAME' => $name, 'AWS_REGION' => $region, 'AWS_LOCAL' => true];
4444

4545
try {
46-
$target= $this->impl->newInstance(new Environment(getcwd(), Console::$out, $environment))->target();
47-
$lambda= $target instanceof Lambda ? [$target, 'process'] : $target;
46+
$lambda= $this->impl->newInstance(new Environment(getcwd(), Console::$out, $environment))->lambda();
4847
} catch (Throwable $e) {
4948
Console::$err->writeLine($e);
5049
return 127;

0 commit comments

Comments
 (0)