diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-02-25 14:55:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 14:55:00 +0300 |
commit | 1e52ca7d683d8586d7b6bdd56783fef7f7d3b081 (patch) | |
tree | d625a5ce9b5c2d91494cf877ca73ecf7e3c598c1 | |
parent | c04c9e3f3b9c8955ba4d730d32bc3134f5a6a774 (diff) | |
parent | 82271965fa23fb0ba2b4f0e12782429cabf340d3 (diff) |
Merge pull request #1166 from nextcloud/backport/1154/stable18stable18
[stable18] Add missing exit codes
-rw-r--r-- | lib/Command/Create.php | 1 | ||||
-rw-r--r-- | lib/Command/Delete.php | 1 | ||||
-rw-r--r-- | lib/Command/ExpireGroupVersions.php | 1 | ||||
-rw-r--r-- | lib/Command/ExpireGroupVersionsPlaceholder.php | 1 | ||||
-rw-r--r-- | lib/Command/ListCommand.php | 3 | ||||
-rw-r--r-- | lib/Command/Quota.php | 1 | ||||
-rw-r--r-- | lib/Command/Rename.php | 1 | ||||
-rw-r--r-- | lib/Command/Scan.php | 1 |
8 files changed, 9 insertions, 1 deletions
diff --git a/lib/Command/Create.php b/lib/Command/Create.php index a0fc4d43..5a68c399 100644 --- a/lib/Command/Create.php +++ b/lib/Command/Create.php @@ -49,5 +49,6 @@ class Create extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $this->folderManager->createFolder($input->getArgument('name')); + return 0; } } diff --git a/lib/Command/Delete.php b/lib/Command/Delete.php index ef3f13e8..52fbb868 100644 --- a/lib/Command/Delete.php +++ b/lib/Command/Delete.php @@ -63,6 +63,7 @@ class Delete extends Base { $this->folderManager->removeFolder($folderId); $folder->delete(); } + return 0; } else { $output->writeln('<error>Folder not found: ' . $folderId . '</error>'); return -1; diff --git a/lib/Command/ExpireGroupVersions.php b/lib/Command/ExpireGroupVersions.php index bc252a4b..44cc4a00 100644 --- a/lib/Command/ExpireGroupVersions.php +++ b/lib/Command/ExpireGroupVersions.php @@ -58,5 +58,6 @@ class ExpireGroupVersions extends Base { }); $this->expireManager->expireAll(); + return 0; } } diff --git a/lib/Command/ExpireGroupVersionsPlaceholder.php b/lib/Command/ExpireGroupVersionsPlaceholder.php index 12685cff..0512c894 100644 --- a/lib/Command/ExpireGroupVersionsPlaceholder.php +++ b/lib/Command/ExpireGroupVersionsPlaceholder.php @@ -39,5 +39,6 @@ class ExpireGroupVersionsPlaceholder extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('<error>groupfolder version handling is only supported with Nextcloud 15 and up</error>'); + return 0; } } diff --git a/lib/Command/ListCommand.php b/lib/Command/ListCommand.php index 4f021014..ca8c87dd 100644 --- a/lib/Command/ListCommand.php +++ b/lib/Command/ListCommand.php @@ -67,7 +67,7 @@ class ListCommand extends Base { } else { $output->writeln("<info>No folders configured</info>"); } - return; + return 0; } if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { @@ -91,6 +91,7 @@ class ListCommand extends Base { }, $folders)); $table->render(); } + return 0; } private function permissionsToString(int $permissions): string { diff --git a/lib/Command/Quota.php b/lib/Command/Quota.php index 26a2e63c..eb08a407 100644 --- a/lib/Command/Quota.php +++ b/lib/Command/Quota.php @@ -57,6 +57,7 @@ class Quota extends Base { $quota = ($quotaString === 'unlimited') ? FileInfo::SPACE_UNLIMITED : \OCP\Util::computerFileSize($quotaString); if ($quota) { $this->folderManager->setFolderQuota($folderId, $quota); + return 0; } else { $output->writeln('<error>Unable to parse quota input: ' . $quotaString . '</error>'); return -1; diff --git a/lib/Command/Rename.php b/lib/Command/Rename.php index c402c9bc..6e221640 100644 --- a/lib/Command/Rename.php +++ b/lib/Command/Rename.php @@ -52,6 +52,7 @@ class Rename extends Base { $folder = $this->folderManager->getFolder($folderId, $this->rootFolder->getMountPoint()->getNumericStorageId()); if ($folder) { $this->folderManager->renameFolder($folderId, $input->getArgument('name')); + return 0; } else { $output->writeln('<error>Folder not found: ' . $folderId . '</error>'); return -1; diff --git a/lib/Command/Scan.php b/lib/Command/Scan.php index ffb8f2e4..7f89ef4e 100644 --- a/lib/Command/Scan.php +++ b/lib/Command/Scan.php @@ -90,6 +90,7 @@ class Scan extends Base { ]; $this->showSummary($headers, null, $output, $end - $start); + return 0; } else { $output->writeln('<error>Folder not found: ' . $folderId . '</error>'); return -1; |