Skip to content

Commit

Permalink
Add symlink operation to posix file source
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 9, 2024
1 parent b8b5160 commit 503e69b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/files/sources/posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ def _realize_to(
source_native_path = os.path.normpath(source_native_path)
assert source_native_path.startswith(os.path.normpath(effective_root))

if not self.delete_on_realize:
if self.link_only:
os.symlink(source_native_path, native_path)
elif not self.delete_on_realize:
shutil.copyfile(source_native_path, native_path)
else:
shutil.move(source_native_path, native_path)
Expand Down

0 comments on commit 503e69b

Please sign in to comment.