Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix FileNotFoundError with external packages #211

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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