You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the shell is started interactively (because it has to be started by Elixir, rebar3, or something else), any previous input is lost (i.e. not read as part of the shell). It can be reproduced with these two scripts (save them to a file, chmod +x FILE, and run them):
You need to use -noinput in such scenarios. The -noshell option is for when you want to start a system without a shell and then use io:read or something like that to get the data.
I am not sure if that's always possible. I assume, for example, rebar3 starts with -noshell because a task may need to read some input, but particular commands such as rebar3 shell may start the shell.
Feel free to close this anyway, if it is not worth it though. I just need to know the plan so I can document it. :)
When the shell is started interactively (because it has to be started by Elixir, rebar3, or something else), any previous input is lost (i.e. not read as part of the shell). It can be reproduced with these two scripts (save them to a file,
chmod +x FILE
, and run them):Working script
The script above will send "Hello world" to the shell.
Non-working script
The script above will not send "Hello world" to the shell.
Expected behavior
Perhaps it makes sense to read any buffered input when starting the shell? I am also fine if this is expected somehow, but I thought I would report.
Affected versions
Erlang/OTP 26. Note this works fine if I use
-user
but I think starting the shell interactively is a better experience. :)Thank you.
The text was updated successfully, but these errors were encountered: