diff --git a/swh/scanner/cli.py b/swh/scanner/cli.py --- a/swh/scanner/cli.py +++ b/swh/scanner/cli.py @@ -49,9 +49,8 @@ ) raise InvalidDirectoryPath(error_msg) - if glob.glob(pattern): - regex = fnmatch.translate(str(PosixPath(pattern))) - yield re.compile(regex) + regex = fnmatch.translate(str(PosixPath(pattern))) + yield re.compile(regex) @scanner.command(name="scan")