diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2020-07-30 19:13:40 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2020-07-30 19:13:40 -0100 |
commit | 445ad1587874dd4dbcbe7f930a9596d6ae6344ec (patch) | |
tree | 0d04e0c1c0107668100a913f280c92fd4af82663 | |
parent | 39280310b298abf4270d0778d94eb610cfefd54f (diff) |
uninstall before purge
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-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>'); } |