I want to have a batch file that opens the command prompt, launches the iex shell within it and then starts my elixir program. The issue I'm having is that as soon as I invoke iex -S mix, which compiles the code and opens the elixir shell, then I am unable to write more commands into it.
:: Start iex and compile with mix
iex -S mix
:: Start elevators
Elevator.Supervisor.start
pause
The last part Elevator.Supervisor.start
never runs, for some reason. I guess this is because I opened a shell within the command prompt. Is there a way to feed commands into the iex?
iex
won’t accept any piping. – Aleksei Matiushkin