diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php index 3b51e4a9e6d5c..898d4db785063 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -96,12 +96,12 @@ protected function execute(InputInterface $input, OutputInterface $output) { if (!$sourceUserObject instanceof IUser) { $output->writeln("Unknown source user $this->sourceUser"); - return; + return 1; } if (!$destinationUserObject instanceof IUser) { $output->writeln("Unknown destination user $this->destinationUser"); - return; + return 1; } $this->sourceUser = $sourceUserObject->getUID(); @@ -110,7 +110,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');