Skip to content

Commit 3e7cb37

Browse files
committed
fix: allow options and params in console sync
1 parent 508d06a commit 3e7cb37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/leaf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ $app->register(Leaf\Console\ViewInstallCommand::class);
3333
$app->register(Leaf\Console\DeployCommand::class);
3434

3535
$app->on('command.notFound', function ($event) use ($app) {
36-
$command = $event->getCommandName();
36+
$data = array_slice($event->getCommandArgv(), 1);
3737

38-
if (\Leaf\FS\File::exists(getcwd() . "/leaf")) {
39-
$exitCode = (int) sprout()->run("php leaf $command", null);
38+
if (\Leaf\FS\File::exists(getcwd() . '/leaf')) {
39+
$exitCode = (int) sprout()->run('php leaf ' . implode(' ', $data), null);
4040
$event->setExitCode($exitCode);
4141
$event->stopPropagation();
4242
}

0 commit comments

Comments
 (0)