mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 15:21:48 +03:00
Don't report EOFException on shutdown (#7157)
It's part of the normal shutdown workflow and confused users are reporting it as a failure.
This commit is contained in:
parent
58c81f2975
commit
26bd95cf3d
@ -21,10 +21,9 @@ import zio.Console.{printLine, printLineError, readLine}
|
||||
import zio.interop.catz.core._
|
||||
import zio.{ExitCode, Runtime, Scope, UIO, ZAny, ZIO, ZIOAppArgs, ZIOAppDefault}
|
||||
|
||||
import java.io.IOException
|
||||
import java.io.{EOFException, IOException}
|
||||
import java.nio.file.{FileAlreadyExistsException, Files, Path, Paths}
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor
|
||||
|
||||
import scala.concurrent.duration._
|
||||
import scala.concurrent.{Await, ExecutionContext, ExecutionContextExecutor}
|
||||
|
||||
@ -85,7 +84,12 @@ object ProjectManager extends ZIOAppDefault with LazyLogging {
|
||||
private def tryReadLine: ZIO[ZAny, Nothing, String] =
|
||||
readLine.catchAll { err =>
|
||||
ZIO
|
||||
.succeed { logger.warn("Failed to read line.", err) }
|
||||
.succeed {
|
||||
err match {
|
||||
case _: EOFException =>
|
||||
case _ => logger.warn("Failed to read line.", err)
|
||||
}
|
||||
}
|
||||
.as("")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user