Open alexjp opened 2 years ago
If you use files.rsync
, this will preserve your symlink structure. I just tested this and it works.
thanks @sysadmin75 !
I was thinking on using files.sync, because the documentation says that : "The files.rsync operation is in alpha, and only supported using SSH or @local connectors.".
Thank you for raising this issue @alexjp! Currently files.sync
doesn't have any handling for links - but it definitely should copy the links as-is!
Sidenote: I'm also going to bump the rsync operation to beta because it's stable, albeit not as well tested as others (incl files.sync
).
thanks !
and also thanks for marking rsync as beta also :)
Describe the bug
I am trying to sync a folder with a symlink on it. It seems pyinfra replaces the symlink into the "symlink destination" or ignores the symlink if its to a folder.
To Reproduce
create a folder "test" create file "test/1" and folder "test/a" cd "test" and do "ln -s 1 2" and "ln -s a b"
pyinfra will copy the files 1 and replace symlink 2 with the destination, this case 1. pyinfra will ignore the symlink b
Expected behavior
it would be expected that it would have the symlinks 2 and b, like they are in the source folder.
Meta
pyinfra --support
.-vv
and--debug
.Thanks for pyinfra, i am very new to it, but seems very cool!