Currently, passing a Stream.resource/3 (or other simple stream items) results in the following error (#18):
** (ArgumentError) :input must be either Enumerable or a function with arity 1
(ex_cmd 0.8.0) lib/ex_cmd/stream.ex:65: ExCmd.Stream.start_input_streamer/2
(ex_cmd 0.8.0) lib/ex_cmd/stream.ex:44: ExCmd.Stream.__build__/2
iex:4: (file)
It looks like the functions tried in ExCmd.Stream.start_input_streamer/2 are failing because of some logic and the order they're defined. This patch fixes the logic and adds a test to catch the case with certain types of Streams.
Currently, passing a
Stream.resource/3
(or other simple stream items) results in the following error (#18):It looks like the functions tried in
ExCmd.Stream.start_input_streamer/2
are failing because of some logic and the order they're defined. This patch fixes the logic and adds a test to catch the case with certain types of Streams.