rxdi / firelink

Firebase. gcloud and monorepos are not combining very well until they met @rxdi/firelink
MIT License
68 stars 9 forks source link

Does not work when rsync is not installed #55

Closed calclavia closed 1 year ago

calclavia commented 2 years ago

On certain docker images (node:16, commonly used in CIs) without rsync command installed, this package does not work. Is there a way to fall back to a NodeJS implementation that does not rely on rsync when this occurs?

node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: spawn rsync ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn rsync',
  path: 'rsync',
zallesov commented 2 years ago

Having the same issue. Ended up here too. 👍 to boost the issue.

Stradivario commented 2 years ago

Hi guys @zallesov @calclavia

I have introduced a PR which should resolve this problem.

https://github.com/rxdi/firelink/pull/57

Executing command firelink --use-native-copy will use native nodejs implementation for recursive copy folders and files.

Please give it a shot by installing latest firelink and tell me how it goes.

npm install @rxdi/firelink@0.8.2

Cheers!

Stradivario commented 2 years ago

Was thinking recently that i will make a fallback if rsync is not available to use native implementation so you don't need to provide additional argument.

Cheers

Stradivario commented 1 year ago

Closing this due to inactivity please feel free to open it if this issue persists

zallesov commented 1 year ago

@Stradivario Looks like in version 0.9.x you removed this flag --use-native-copy and did not add a fallback to native. What is the solution than?

Stradivario commented 1 year ago

Interesting i didn't remove it let me check what is going on