Skip to content

Commit

Permalink
fix issue with yaml not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
baudsimVD committed Feb 3, 2025
1 parent d4e2dcc commit 5667934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dbt_osmosis/core/osmosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,9 @@ def _is_fqn_match(node: ResultNode, fqns: list[str]) -> bool:
def _is_file_match(node: ResultNode, paths: list[Path | str], root: Path | str) -> bool:
"""Check if a node's file path matches any of the provided file paths or names."""
node_path = Path(root, node.original_file_path).resolve()
yaml_path = None
if node.patch_path:
yaml_path = Path(root, node.patch_path.partition("://")[-1]).resolve()
absolute_patch_path = Path(root, node.patch_path.partition("://")[-1]).resolve()
yaml_path = absolute_patch_path if absolute_patch_path.exists() else None
for model_or_dir in paths:
model_or_dir = Path(model_or_dir).resolve()
if node.name == model_or_dir.stem:
Expand Down

0 comments on commit 5667934

Please sign in to comment.