We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import collection.immutable.StringOps import play.api.libs.concurrent.Promise.timeout import concurrent.{Await} import concurrent.duration.Duration val maxDuration = Duration.Inf val stringToBytes = (str: StringOps) => str.map(_.toByte).toArray val bytesJoinConsumer = Iteratee.fold[Array[Byte], Array[Byte]](Array[Byte]())((a, b) => a++b) val nbOfLines = 3 val line = stringToBytes("hello\n") val enum = Enumerator.generateM[Array[Byte]] { timeout(Some(line), 5) } val pipe = CLI.pipe(Seq("head", "-n", nbOfLines.toString), 10) val result: Array[Byte] = Await.result(enum &> pipe |>>> bytesJoinConsumer, maxDuration) println(result.map(_.toChar).mkString)
The text was updated successfully, but these errors were encountered:
Fixed with commit c723bb8
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: