Skip to content

Commit 9f9b1bc

Browse files
committed
Only raise symlink failure error if target exists
1 parent 460350f commit 9f9b1bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ecbundle/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def symlink_force(target, link_name):
124124
os.remove(link_name)
125125
os.symlink(target_orig, link_name)
126126

127-
if not os.path.exists(link_name):
127+
if os.path.exists(target_orig) and not os.path.exists(link_name):
128128
error(
129129
"ERROR: Failed to create valid link from {0} to {1}".format(
130130
link_name, target_orig

0 commit comments

Comments
 (0)