summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-11-07 13:22:11 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-11-14 16:57:18 +0100
commit1355f2039e4bbeb7e24cd27992b7562d647db0eb (patch)
treed14b0990a3e26fa80c83dd03767ac39ae5c58e98 /apps
parentcebb68992509215163f6776b76e48411a31a287e (diff)
downloadnextcloud-server-1355f2039e4bbeb7e24cd27992b7562d647db0eb.tar.gz
nextcloud-server-1355f2039e4bbeb7e24cd27992b7562d647db0eb.zip
Transfer ownership now returns exit code on error (#26546)
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/Command/TransferOwnership.php6
1 files 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("<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');