diff options
-rw-r--r-- | lib/Command/Reset.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/Command/Reset.php b/lib/Command/Reset.php index 0a24b5c8..f81de329 100644 --- a/lib/Command/Reset.php +++ b/lib/Command/Reset.php @@ -121,19 +121,28 @@ class Reset extends Base { return; } + + if ($input->getOption('uninstall')) { + try { + $output->writeln(''); + $output->write('Uninstalling Social App...'); + $this->fullUninstall($output); + $output->writeln('<info>uninstalled</info>'); + } catch (Exception $e) { + $output->writeln('<error>' . $e->getMessage() . '</error>'); + } + + return; + } + + $output->writeln(''); $output->write('flushing data... '); try { $this->coreRequestBuilder->emptyAll(); $output->writeln('<info>done</info>'); } catch (Exception $e) { - $output->writeln('<error>fail</error>'); - - return; - } - - if ($input->getOption('uninstall')) { - $this->fullUninstall($output); + $output->writeln('<error>' . $e->getMessage() . '</error>'); return; } @@ -170,8 +179,6 @@ class Reset extends Base { $this->coreRequestBuilder->uninstallFromJobs(); $this->uninstallWellKnown(); $this->configService->unsetAppConfig(); - - $output->writeln('Nextcloud Social App <info>uninstalled</info>'); } |