Skip to content

Commit 22e212b

Browse files
authored
[BUILD] Ensure parent directory exists before creating symlinks (#5258)
Fixes #5256
1 parent c780bf4 commit 22e212b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def update_symlink(link_path, source_path):
247247
shutil.rmtree(link_path)
248248

249249
print(f"creating symlink: {link_path} -> {source_path}", file=sys.stderr)
250+
link_path.absolute().parent.mkdir(parents=True, exist_ok=True) # Ensure link's parent directory exists
250251
link_path.symlink_to(source_path, target_is_directory=True)
251252

252253

0 commit comments

Comments
 (0)