@@ -67,28 +67,29 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6767 {
6868 $ leaf = Utils \Core::findLeaf ();
6969 $ composer = Utils \Core::findComposer ();
70- $ needsUpdate = Package::updateAvailable ();
70+ // $needsUpdate = Package::updateAvailable();
7171
72- if ($ needsUpdate ) {
73- $ output ->writeln ('<comment>Update found, updating to the latest stable version...</comment> ' );
74- $ updateProcess = Process::fromShellCommandline ('php ' . dirname (__DIR__ ) . '/bin/leaf update ' );
72+ $ output ->writeln ('<comment>v4.0 Beta has been released. Run composer global require leafs/cli:v4.0-beta -W to try it out</comment> ' );
7573
76- $ updateProcess ->run ();
74+ // if ($needsUpdate) {
75+ // // $updateProcess = Process::fromShellCommandline('php ' . dirname(__DIR__) . '/bin/leaf update');
7776
78- if ($ updateProcess ->isSuccessful ()) {
79- $ output ->writeln ("<info>Leaf CLI updated successfully, building your app...</info> \n" );
77+ // // $updateProcess->run();
8078
81- $ createProcess = Process::fromShellCommandline ('php ' . implode (' ' , $ _SERVER ['argv ' ]));
82- $ createProcess ->run (function ($ type , $ line ) use ($ output ) {
83- $ output ->write ($ line );
84- });
79+ // // if ($updateProcess->isSuccessful()) {
80+ // // $output->writeln("<info>Leaf CLI updated successfully, building your app...</info>\n");
8581
86- return 0 ;
87- } else {
88- $ output ->writeln ("<error>❌ Leaf CLI update failed, please try again later</error> \n" );
89- $ output ->writeln ("⚙️ Creating app with current version... \n" );
90- }
91- }
82+ // // $createProcess = Process::fromShellCommandline('php ' . implode(' ', $_SERVER['argv']));
83+ // // $createProcess->run(function ($type, $line) use ($output) {
84+ // // $output->write($line);
85+ // // });
86+
87+ // // return 0;
88+ // // } else {
89+ // // $output->writeln("<error>❌ Leaf CLI update failed, please try again later</error>\n");
90+ // // $output->writeln("⚙️ Creating app with current version...\n");
91+ // // }
92+ // }
9293
9394 $ name = $ this ->getAppName ($ input , $ output );
9495 $ directory = $ name !== '. ' ? getcwd () . '/ ' . $ name : getcwd ();
0 commit comments