Skip to content

Commit

Permalink
Fixed broken --stdin (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
shyiko committed May 31, 2017
1 parent 07af6d1 commit 16fb424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ktlint/src/main/kotlin/com/github/shyiko/ktlint/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ ${ByteArrayOutputStream().let { this.printUsage(it); it }.toString().trimEnd().s
.parallel({
fileNumber++
errorNumber += it.size
if (stdin) it.forEach { System.err.println(it) } else it.forEach { System.out.println(it) }
it.forEach { System.out.println(it) }
})
if (stdin) {
apply("<text>", String(System.`in`.readBytes()))
apply("<text>", String(System.`in`.readBytes())).forEach { System.err.println(it) }
} else {
if (patterns.isEmpty()) {
val filter = HiddenFileFilter(reverse = true)
Expand Down

0 comments on commit 16fb424

Please sign in to comment.