]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add error message when no users specified to files:scan command
authorVincent Petry <pvince81@owncloud.com>
Thu, 26 Jun 2014 09:58:38 +0000 (11:58 +0200)
committerVincent Petry <pvince81@owncloud.com>
Thu, 26 Jun 2014 09:58:38 +0000 (11:58 +0200)
apps/files/command/scan.php

index 25ab70af3629a7d50940c589f1b6cd41c52dd62b..1e7b54bb01e038c65f99a258e7648b3a9c307712 100644 (file)
@@ -63,6 +63,11 @@ class Scan extends Command {
                        $users = $input->getArgument('user_id');
                }
 
+               if (count($users) === 0) {
+                       $output->writeln("<error>Please specify the user id to scan or \"--all\" to scan for all users</error>");
+                       return;
+               }
+
                foreach ($users as $user) {
                        if (is_object($user)) {
                                $user = $user->getUID();