aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command/Scan.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-26 15:12:11 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-26 15:12:11 +0200
commitd7c0b9cced2dff16e4e05507ac58cf8664a6aafc (patch)
treebb136f0e797986da6e789bf2bf5e9f0370002d26 /apps/files/lib/Command/Scan.php
parentab21d69903c4360cbce59741624b6e765e3bd35f (diff)
downloadnextcloud-server-d7c0b9cced2dff16e4e05507ac58cf8664a6aafc.tar.gz
nextcloud-server-d7c0b9cced2dff16e4e05507ac58cf8664a6aafc.zip
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files/lib/Command/Scan.php')
-rw-r--r--apps/files/lib/Command/Scan.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index c75073e428f..aea6003417d 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -169,7 +169,7 @@ class Scan extends Base {
return substr_count($mountPoint->getMountPoint(), '/') <= 3;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$inputPath = $input->getOption('path');
if ($inputPath) {
$inputPath = '/' . trim($inputPath, '/');
@@ -190,7 +190,7 @@ class Scan extends Base {
$users_total = count($users);
if ($users_total === 0) {
$output->writeln('<error>Please specify the user id to scan, --all to scan for all users or --path=...</error>');
- return;
+ return 1;
}
$this->initTools();
@@ -219,6 +219,7 @@ class Scan extends Base {
}
$this->presentStats($output);
+ return 0;
}
/**