Skip to content

Commit deaadb1

Browse files
committed
Handle symlinks on Windows
1 parent a5efdae commit deaadb1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pyperformance/_pyproject_toml.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def parse_pyproject_toml(text, rootdir, name=None, *,
5252
tools=None,
5353
requirefiles=True,
5454
):
55-
print("TOML", repr(text))
5655
data = toml.loads(text)
5756
unused = list(data)
5857

@@ -85,6 +84,13 @@ def load_pyproject_toml(filename, *, name=None, tools=None, requirefiles=True):
8584

8685
with open(filename, encoding="utf-8") as infile:
8786
text = infile.read()
87+
88+
symlink = os.path.join(filename, text.strip())
89+
if os.path.exists(symlink):
90+
return load_pyproject_toml(
91+
symlink, name=name, tools=tools, requireFiles=requireFiles
92+
)
93+
8894
data = parse_pyproject_toml(text, rootdir, name,
8995
tools=tools,
9096
requirefiles=requirefiles,

0 commit comments

Comments
 (0)