Skip to content

Commit 3c7b084

Browse files
committed
Create parent dir of symlink if it does not exist
1 parent bd5c830 commit 3c7b084

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/install

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def create_symlink(real_location, symlink_name):
103103
print("Symlink already exists: %s" % symlink_name)
104104
print("Removing symlink.")
105105
os.remove(symlink_name)
106+
symlink_dir_name = os.path.dirname(symlink_name)
107+
if not os.path.isdir(symlink_dir_name):
108+
os.makedirs(symlink_dir_name)
106109
os.symlink(real_location, symlink_name)
107110
return True
108111

0 commit comments

Comments
 (0)