Skip to content

Commit

Permalink
Try to fix/workaround CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jherland committed Sep 19, 2024
1 parent 7188d51 commit d89f6bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fawltydeps/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def __post_init__(self) -> None:
super().__post_init__()
assert self.path.is_dir() # noqa: S101, sanity check

bin_python = self.path.parent.parent.parent / "bin/python"

# Support Windows projects
if sys.platform.startswith("win"):
if (
Expand All @@ -162,9 +164,8 @@ def __post_init__(self) -> None:
):
return # also ok
# Support vitualenvs, poetry2nix envs, system-wide installs, etc.
elif (
self.path.match("lib/python?.*/site-packages")
and (self.path.parent.parent.parent / "bin/python").is_file()
elif self.path.match("lib/python?.*/site-packages") and (
bin_python.is_file() or bin_python.is_symlink()
):
return # all ok

Expand Down

0 comments on commit d89f6bd

Please sign in to comment.