cross-platform-actions / action

Cross-platform GitHub action
MIT License
140 stars 19 forks source link

Sync back files from VM skips all symlinks #76

Closed mhuijgen closed 9 months ago

mhuijgen commented 12 months ago

It looks like rsync is ignoring symlinks during sync back.

Tearing down VM
  Syncing back files
  /usr/bin/rsync -uzrtopg runner@localhost:work/ /home/runner/work
  skipping non-regular file "my-project/"my-project/Server/node_modules/.bin/acorn"
  skipping non-regular file "my-project/"my-project/Server/node_modules/.bin/browserslist"
  skipping non-regular file "my-project/"my-project/Server/node_modules/.bin/color-support"
  skipping non-regular file "my-project/"my-project/Server/node_modules/.bin/conc"

Is this intentional or oversight?

If the latter, would it be possible to add -l to the rsync command used: --links, -l copy symlinks as symlinks

Looking at the rsync flags used to sync to the VM they are covered by the -a option /usr/bin/rsync -auzrtopg ......

Using -a could be an option as well, but this also includes special device files (-D option) as well as symlinks. If you want to keep using -a, I think its safe to remove rtopg options, since they are part of the -a option.

jacob-carlborg commented 12 months ago

Is this intentional or oversight?

This is an oversight.

Perhaps it would make sense to use the same set of flags to sync in both directions.

mhuijgen commented 10 months ago

Hi @jacob-carlborg,

Can I be of help by providing a PR that makes it use the same flags on both directions? It would really help us out of this rsync symlink issue would be fixed.

jacob-carlborg commented 10 months ago

Can I be of help by providing a PR that makes it use the same flags on both directions? It would really help us out of this rsync symlink issue would be fixed.

@mhuijgen sure, I've completely forgotten about this.

mhuijgen commented 10 months ago

Created a PR #81