Show a proper error message when trying to scan the filesystem for a non existing user
This commit is contained in:
parent
3da6b3b533
commit
e8280c80da
1 changed files with 5 additions and 1 deletions
|
@ -77,7 +77,11 @@ class Scan extends Command {
|
|||
if (is_object($user)) {
|
||||
$user = $user->getUID();
|
||||
}
|
||||
$this->scanFiles($user, $output);
|
||||
if ($this->userManager->userExists($user)) {
|
||||
$this->scanFiles($user, $output);
|
||||
} else {
|
||||
$output->writeln("<error>Unknown user $user</error>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue