Skip to content

Commit

Permalink
fix zombie cloc process bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Nov 25, 2017
1 parent 72d076a commit 1fdfe9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/scala/com/lightbend/tools/ClocComponent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ object ClocComponent {
def countLines(files: Seq[File]): Int =
sys.process.Process(command ++ files.map(_.toString))
.lineStream
.toList // run to completion, don't leave the process around
.map(_.split(','))
.collectFirst{case Array(_, "Scala", _, _, n) => n.toInt}
.getOrElse(0)
Expand Down

0 comments on commit 1fdfe9c

Please sign in to comment.