File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 2222use Symfony \Component \Console \Output \NullOutput ;
2323use Symfony \Component \Console \Output \OutputInterface ;
2424use Symfony \Component \Process \Process ;
25+ use Throwable ;
2526
2627final class BuildCommand extends Command implements SignalableCommandInterface
2728{
@@ -93,9 +94,19 @@ private function build(string $name): void
9394 * after compile all the code to a single file, we move the built file
9495 * to the builds folder with the correct permissions.
9596 */
96- $ this ->prepare ()
97- ->compile ($ name )
98- ->clear ();
97+ $ exception = null ;
98+
99+ try {
100+ $ this ->prepare ()->compile ($ name );
101+ } catch (Throwable $ exception ) {
102+ //
103+ }
104+
105+ $ this ->clear ();
106+
107+ if ($ exception !== null ) {
108+ throw $ exception ;
109+ }
99110
100111 $ this ->output ->writeln (
101112 sprintf (' Compiled successfully: <fg=green>%s</> ' , $ this ->app ->buildsPath ($ name ))
Original file line number Diff line number Diff line change @@ -74,4 +74,4 @@ public function clear()
7474 expect ($ exception )->toBeInstanceOf (RuntimeException::class)
7575 ->and ($ exception ->getMessage ())->toEqual ('Foo bar ' )
7676 ->and ($ contents )->toEqual (File::get (config_path ('app.php ' )));
77- })-> skip ( ' This test is currently broken (investigating) ' ) ;
77+ });
You can’t perform that action at this time.
0 commit comments