diff --git a/installation/src/Console/InstallCommand.php b/installation/src/Console/InstallCommand.php index 667dfe5b6caee..9ba642657c97a 100644 --- a/installation/src/Console/InstallCommand.php +++ b/installation/src/Console/InstallCommand.php @@ -175,6 +175,8 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in $cleanupModel = $app->getMVCFactory()->createModel('Cleanup', 'Installation'); if (!$cleanupModel->deleteInstallationFolder()) { + $this->ioStyle->error('Unable to delete installation folder!'); + return Command::FAILURE; } @@ -184,7 +186,11 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in if (!empty($cfg['public_folder'])) { $this->ioStyle->write('Creating the public folder...'); - if (!(new PublicFolderGeneratorHelper())->createPublicFolder($cfg['public_folder'])) { + try { + (new PublicFolderGeneratorHelper())->createPublicFolder($cfg['public_folder']); + } catch (\Exception $e) { + $this->ioStyle->error($e->getMessage()); + return Command::FAILURE; }