Port communication (with escript) does not work in (distillery) release version

I opened an issue for this and got this answer from José Valim:

@DerKastellan if you see the output that you have added of File.cwd you will notice that the current working directory is different. The release runs inside the release directory. Any file that you need in production needs to be in the priv directory. So you should move the file to “priv/test.esh” and then locate it using Application.app_dir(:name_of_your_app, “priv/test.esh”).

I will have to check if that solves my problem. Not sure, since my problem is not that the application is not started - I can verify that it actually is. On my machine, I see it print an initial log but then no further piped communication takes place.

Adding this as additional cross-reference as to where to put files to be delivered with release: Including data files in a Distillery release