Open roylez opened 6 years ago
I find System.cmd
works with better consistency. It seems to give more reliable output, and internally, it still uses Port.open
.
iex(xxxx@127.0.0.1)17> System.cmd(Path.join(:code.priv_dir(:captcha), "captcha"), [])
{<<119, 117, 121, 102, 115, 71, 73, 70, 56, 57, 97, 200, 0, 70, 0, 131, 0, 0,
63, 81, 181, 63, 81, 181, 63, 81, 181, 63, 81, 181, 63, 81, 181, 63, 81, 181,
63, 81, 181, 63, 81, 181, 63, 81, 181, 63, 81, 181, 63, ...>>, 0}
Will this pull request be accepted or does Port.open work "more reliably" by now?
This thing drives me nuts. The same Dockerfile compiles okay locally, but the gives me the following when compiled by CI remotely.
In short,
Port.open
for some unknown reason could return two messages instead of one.