diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php index 323162ad8f20..6fb60a71c186 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -93,11 +93,11 @@ protected function execute(InputInterface $input, OutputInterface $output) { $destinationUserObject = $this->userManager->get($input->getArgument('destination-user')); if (is_null($sourceUserObject)) { $output->writeln("Unknown source user $this->sourceUser"); - return; + return 1; } if (is_null($destinationUserObject)) { $output->writeln("Unknown destination user $this->destinationUser"); - return; + return 1; } $this->sourceUser = $sourceUserObject->getUID(); @@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { // target user has to be ready if (!\OC::$server->getEncryptionManager()->isReadyForUser($this->destinationUser)) { $output->writeln("The target user is not ready to accept files. The user has at least to be logged in once."); - return; + return 2; } $date = date('c');