diff --git a/helpers.go b/helpers.go index f84967f..6cf5908 100644 --- a/helpers.go +++ b/helpers.go @@ -70,7 +70,9 @@ func getStdinLinesOrArgumentsFromSlice(args []string) chan string { // try the stdin multi := make(chan string) - writeStdinLinesOrNothing(multi) + if !writeStdinLinesOrNothing(multi) { + close(multi) + } return multi }