Skip to content

Commit 44edf6a

Browse files
authored
Convert relative to absolute paths in link resolving (#3)
1 parent d761c1e commit 44edf6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clr_loader/hostfxr.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ def __init__(self, runtime_config, dotnet_root=None):
2222
raise RuntimeError("Can not determine dotnet root")
2323

2424
try:
25-
dotnet_path = os.readlink(dotnet_path)
25+
dotnet_tmp_path = os.readlink(dotnet_path)
26+
if os.path.isabs(dotnet_tmp_path):
27+
dotnet_path = dotnet_tmp_path
28+
else:
29+
dotnet_path = os.path.abspath(os.path.join(os.path.dirname(dotnet_path), dotnet_tmp_path))
2630
except OSError:
2731
pass
2832

0 commit comments

Comments
 (0)