From 1355f2039e4bbeb7e24cd27992b7562d647db0eb Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 7 Nov 2016 13:22:11 +0100 Subject: [PATCH] Transfer ownership now returns exit code on error (#26546) --- apps/files/lib/Command/TransferOwnership.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php index 3b51e4a9e6d..898d4db7850 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -96,12 +96,12 @@ class TransferOwnership extends Command { 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 @@ class TransferOwnership extends Command { // 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'); -- 2.39.5