Transfer ownership now returns exit code on error (#26546)

This commit is contained in:
Vincent Petry 2016-11-07 13:22:11 +01:00 committed by Morris Jobke
parent cebb689925
commit 1355f2039e
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 3 additions and 3 deletions

View 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');