cross-platform-actions / action

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

Disable or configure verbose rsync #11

Closed jonahbeckford closed 2 years ago

jonahbeckford commented 2 years ago

Thank you for your project!

I have a feature request. I would like to have rsync verbose mode (-v) turned off by default or by configuration.

The verbose option is added here:

https://github.com/cross-platform-actions/action/blob/cad49645ab08277fa1933419b1d4f59baf11a159/src/action/action.ts#L221-L240

With my project I have 16,000 verbose lines added at the beginning of the step. Here is an example (look at the "Test in VirtualBox" step:

https://github.com/diskuv/dkml-c-probe/actions/runs/2449053587

In the example you will see openbsd 6.9 disabled because the VirtualBox OpenBSD 6.9 image is missing some important syspatches. That problem is not part of this issue

jacob-carlborg commented 2 years ago

Sounds reasonable. I can add the -v flag only in debug mode.

jacob-carlborg commented 2 years ago

You need to update to version 0.6.1.

jonahbeckford commented 2 years ago

I tried v0.6.1 and it now only works if I have debug mode enabled:

Syncing back files
/usr/bin/rsync -uzrtopg  runner@192.168.64.2:work/ /Users/runner/work
rsync: link_stat "/Users/runner/work/dkml-c-probe/dkml-c-probe/runner@192.168.64.2:work/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Terminating VM
/usr/bin/sudo kill -s TERM 1469

I think it is because with an empty syncVerboseFlag: https://github.com/cross-platform-actions/action/blob/52ad2be2afbddaeb29083cf99497bb159942b0f4/src/action/action.ts#L225-L227 in https://github.com/cross-platform-actions/action/blob/52ad2be2afbddaeb29083cf99497bb159942b0f4/src/action/action.ts#L235-L242 you would get the second argument (this.syncVerboseFlag) as an empty string.

rsync will see the empty string and try to sync that.