]> source.dussan.org Git - nextcloud-server.git/commitdiff
Transfer ownership now returns exit code on error (#26546) 2125/head
authorVincent Petry <pvince81@owncloud.com>
Mon, 7 Nov 2016 12:22:11 +0000 (13:22 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 14 Nov 2016 15:57:18 +0000 (16:57 +0100)
apps/files/lib/Command/TransferOwnership.php

index 3b51e4a9e6d5c4352f79c859a080f20902994e04..898d4db785063187aa5023f70cd96535a9045526 100644 (file)
@@ -96,12 +96,12 @@ class TransferOwnership extends Command {
 
                if (!$sourceUserObject instanceof IUser) {
                        $output->writeln("<error>Unknown source user $this->sourceUser</error>");
-                       return;
+                       return 1;
                }
 
                if (!$destinationUserObject instanceof IUser) {
                        $output->writeln("<error>Unknown destination user $this->destinationUser</error>");
-                       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("<error>The target user is not ready to accept files. The user has at least to be logged in once.</error>");
-                       return;
+                       return 2;
                }
 
                $date = date('c');