Catch ClosedChannelException in TaskTraceEvent

sbt would print a stack trace on exit when run with
-Dsbt.task.timings=true. This removes that annoying stack trace.
This commit is contained in:
Ethan Atkins 2020-07-19 12:10:19 -07:00
parent cd26abd656
commit 761c926944
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ private[sbt] final class TaskTraceEvent
()
} finally {
trace.close()
console.println(s"wrote $outFile")
try console.println(s"wrote $outFile")
catch { case _: java.nio.channels.ClosedChannelException => }
}
}
}