Skip to content

Commit 7b5c026

Browse files
committed
feat: update create command
1 parent f502d61 commit 7b5c026

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "leafs/cli",
33
"description": "A simple command line tool for installing and interacting with your leaf apps",
44
"homepage": "https://cli.leafphp.dev",
5-
"version": "v2.8.2",
5+
"version": "v2.8.3",
66
"keywords": [
77
"leaf",
88
"php",

src/CreateCommand.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
217217

218218
if ($updateProcess->isSuccessful()) {
219219
$output->writeln("<info>Leaf CLI updated successfully, building your app...</info>\n");
220+
221+
$createProcess = Process::fromShellCommandline('php ' . implode(' ', $_SERVER['argv']));
222+
$createProcess->run(function ($type, $line) use ($output) {
223+
$output->write($line);
224+
});
225+
} else {
226+
$output->writeln("<error>Leaf CLI update failed, please try again later</error>\n");
227+
$output->writeln("<comment> - </comment>Creating app with current version...\n");
220228
}
221229
}
222230

src/DeployCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Leaf\Console;
66

77
use Leaf\Console\Utils\Package;
8-
use RuntimeException;
98
use Symfony\Component\Console\Command\Command;
109
use Symfony\Component\Console\Input\InputInterface;
1110
use Symfony\Component\Console\Input\InputOption;

0 commit comments

Comments
 (0)