-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This happens when you fetch a project with a ROOT_MARKER
(i.e. .git
, .hg
, pyproject.toml
) into MacOS's system temp.
Easy repro:
tmp=$(mktemp -d)
ln -s "$tmp" foo
touch foo/.git
python -c 'import trailrunner; from pathlib import Path; next(trailrunner.walk(Path.cwd() / "foo"))'
BOOM:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "xxxxlib/python3.11/site-packages/trailrunner/core.py", line 169, in gen
relative = child.relative_to(root)
^^^^^^^^^^^^^^^^^^^^^^^
File "xxxxlib/python3.11/pathlib.py", line 730, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: 'xxxx/foo' is not in the subpath of '/tmp' OR one path is relative and the other is absolute.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working