diff --git a/src/ansiblelint/file_utils.py b/src/ansiblelint/file_utils.py index bf7ee74d17..2f84cc0766 100644 --- a/src/ansiblelint/file_utils.py +++ b/src/ansiblelint/file_utils.py @@ -66,6 +66,8 @@ def normpath(path: str | BasePathLike) -> str: # we avoid returning relative paths that end-up at root level if path_absolute in relpath: return path_absolute + if relpath.startswith("../"): + return path_absolute return relpath