From 34791889d8d8d6fc56d24699b7a0679099b42a49 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 21 May 2021 15:33:52 +0100 Subject: [PATCH] Fix exclude bug running outside git repos (#1570) Fixes: #1565 --- src/ansiblelint/file_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansiblelint/file_utils.py b/src/ansiblelint/file_utils.py index 791c8927be..322754eb0d 100644 --- a/src/ansiblelint/file_utils.py +++ b/src/ansiblelint/file_utils.py @@ -225,7 +225,7 @@ def discover_lintables(options: Namespace) -> Dict[str, Any]: _logger.warning("Failed to locate command: %s", exc) if out is None: - exclude_pattern = "|".join(options.exclude_paths) + exclude_pattern = "|".join(str(x) for x in options.exclude_paths) _logger.info("Looking up for files, excluding %s ...", exclude_pattern) out = WcMatch('.', exclude_pattern=exclude_pattern, flags=RECURSIVE).match()