Skip to content

Commit

Permalink
added check for file existence before creating symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederickDeny committed Feb 14, 2024
1 parent 9b889ff commit 5fbf4ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion e4s_cl/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ def empty_dir(path: Path):

def create_symlink(path: Path, dest: Path):
dest_full_path = dest / path.name
dest_full_path.symlink_to(path)
if not dest_full_path.exists():
dest_full_path.symlink_to(path)

def hline(title, *args, **kwargs):
"""Build a colorful horizontal rule for console output.
Expand Down

0 comments on commit 5fbf4ef

Please sign in to comment.