husky-elixir icon indicating copy to clipboard operation
husky-elixir copied to clipboard

Stream output instead of buffer.

Open erlandsona opened this issue 5 years ago • 1 comments

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.

erlandsona avatar Sep 03 '19 16:09 erlandsona

Rather maybe switch :os.cmd/1 to System.cmd?

erlandsona avatar Sep 03 '19 16:09 erlandsona