akash-akya / exile

Alternative to ports for running external programs. It provides back-pressure, non-blocking io, and solves port related issues
Apache License 2.0
142 stars 12 forks source link

Fix spawner not being found when under a release #19

Closed g-andrade closed 1 year ago

g-andrade commented 1 year ago

Cool library!

I ran into an issue with spawner not being found (enoent error) when calling Exile.Process.start_link/2.

The spawner path is evaluated at compile time: https://github.com/akash-akya/exile/blob/51adb421a2584c0beb344272324077b6c8bd2c05/lib/exile/process/exec.ex#L12-L14

And therefore spawner fails to launch from a release when the compiled code folders are no longer available (for example, from within a Docker container).

Resolving the path at run time fixed the issue for me.

Info:

akash-akya commented 1 year ago

@g-andrade Good catch! I don't know how I missed it. Thanks for the contributions!