Skip to content

Commit 23134eb

Browse files
committed
use symlink if possible
1 parent 067512b commit 23134eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/zluda_installer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,12 @@ def get_blaslt_enabled() -> bool:
9696

9797
def link_or_copy(src: os.PathLike, dst: os.PathLike):
9898
try:
99-
os.link(src, dst)
99+
os.symlink(src, dst)
100100
except Exception:
101-
shutil.copyfile(src, dst)
101+
try:
102+
os.link(src, dst)
103+
except Exception:
104+
shutil.copyfile(src, dst)
102105

103106

104107
def make_copy() -> None:

0 commit comments

Comments
 (0)