husky-elixir
husky-elixir copied to clipboard
Stream output instead of buffer.
Would love to see the progress of the :io.cmd()
that's currently being executed in parent processes stdout
.
https://github.com/spencerdcarlson/husky-elixir/blob/fcd20b0b3a077255b5d4b4185965a8474ef6a2de/lib/husky/task/execute.ex#L143
Maybe adding an |> IO.stream(:line)
into the pipeline? But it'll probably need an extra |> Stream.map(&IO.puts/1)
too? 🤷♂
I had to do this once in node but I just switched a call to child_process.exec
to spawn('prg', [], { stdio: 'inherit' }); // Child will use parent's stdios.
Rather maybe switch :os.cmd/1
to System.cmd
?