Fix for license symlinking issue. (#26576)
When a symlink to a license file exists but is broken, the license symlink post-install hook fails because os.path.exists() checks the existence of the target not the symlink itself. os.path.lexists() is the proper function to use.
This commit is contained in:
parent
9853fd50e2
commit
0b9914e2f5
@ -175,7 +175,7 @@ def symlink_license(pkg):
|
||||
mkdirp(license_dir)
|
||||
|
||||
# If example file already exists, overwrite it with a symlink
|
||||
if os.path.exists(link_name):
|
||||
if os.path.lexists(link_name):
|
||||
os.remove(link_name)
|
||||
|
||||
if os.path.exists(target):
|
||||
|
Loading…
Reference in New Issue
Block a user