From cb40a70691d60e8a069e471e1f158b724347942e Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Wed, 18 Dec 2024 12:17:32 -0500 Subject: [PATCH] [5.x] Improve starter kit installer error handling (#11281) --- src/StarterKits/Installer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/StarterKits/Installer.php b/src/StarterKits/Installer.php index 448b07d2c8..8554fad327 100644 --- a/src/StarterKits/Installer.php +++ b/src/StarterKits/Installer.php @@ -631,15 +631,15 @@ protected function restoreComposerJson(): self */ public function rollbackWithError(string $error, ?string $output = null): void { + if ($output) { + $this->console->line($this->tidyComposerErrorOutput($output)); + } + $this ->removeStarterKit() ->restoreComposerJson() ->removeComposerJsonBackup(); - if ($output) { - $this->console->line($this->tidyComposerErrorOutput($output)); - } - throw new StarterKitException($error); }