cross-platform-actions / action

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

v0.6.1 only works if debug mode is enabled #12

Closed jonahbeckford closed 2 years ago

jonahbeckford commented 2 years ago

Continues #11.

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.

Originally posted by @jonahbeckford in https://github.com/cross-platform-actions/action/issues/11#issuecomment-1175683402

jacob-carlborg commented 2 years ago

I would have hoped the empty string would be ignored but I guess that only works when executing the command through a shell, which is not happening here.

jacob-carlborg commented 2 years ago

Hmm, I think the CI pipeline for this project runs in debug mode, that's why it passed.

jacob-carlborg commented 2 years ago

Please try 0.6.2 now.

jonahbeckford commented 2 years ago

Works. Thx!