@@ -21,36 +21,27 @@ if ( file_exists( __DIR__ . '/../vendor/autoload.php' ) ) {
2121 exit ( 1 );
2222}
2323
24- $ app = require_once __DIR__ . '/../bootstrap/app.php ' ;
25-
2624/*
2725|--------------------------------------------------------------------------
28- | Run the Console Mantle Application
26+ | Load the Application
2927|--------------------------------------------------------------------------
3028|
31- | Load the Mantle application and run the console application. With isolation
32- | mode enabled, we shouldn't have a dependency on WordPress.
29+ | Load the Mantle application from the bootstrap file.
3330|
3431*/
3532
36- $ kernel = $ app ->make ( Mantle \Contracts \Console \Kernel::class );
37-
38- $ status = $ kernel ->handle (
39- $ input = new Symfony \Component \Console \Input \ArgvInput ,
40- new Symfony \Component \Console \Output \ConsoleOutput (),
41- );
33+ $ app = require_once MANTLE_BASE_DIR . '/bootstrap/app.php ' ;
4234
4335/*
4436|--------------------------------------------------------------------------
45- | Shutdown The Application
37+ | Run the Mantle Console Application
4638|--------------------------------------------------------------------------
4739|
48- | Once the application has finished running, we will fire off the shutdown
49- | events so that any final work may be done by the application before it
50- | is shut down gracefully.
40+ | Load the application with the base configuration and boot it. Booting it will
41+ | cause the console application to run and exit with the status code.
5142|
5243*/
5344
54- $ kernel -> terminate ( $ input , $ status );
55-
56- exit ( $ status );
45+ bootloader ( $ app )
46+ -> set_base_path ( MANTLE_BASE_DIR )
47+ -> boot ( );
0 commit comments