Only change symlink if it is not already correct
This commit is contained in:
parent
c169e557cd
commit
a117211bd2
3
run.py
3
run.py
@ -118,6 +118,9 @@ def convert_template(env, template, key_value_store, out):
|
||||
|
||||
def create_symlink(source, destination):
|
||||
if os.path.exists(destination):
|
||||
if os.path.islink(destination) and os.readlink(destination) == source:
|
||||
return
|
||||
|
||||
if not args.force:
|
||||
print('`{destination}` already exists, will not overwrite. Rerun with `-f` to force overwiring existing files.', file=sys.stderr)
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user