mirror of https://github.com/sbt/sbt.git
Move `IO.read` and `Parser.parseUnsafe` calls inside `try`.
This commit is contained in:
parent
a8f8aa41fa
commit
c660c56644
|
|
@ -195,9 +195,9 @@ class DiskActionCacheStore(base: Path, converter: FileConverter) extends Abstrac
|
|||
override def get(request: GetActionResultRequest): Either[Throwable, ActionResult] =
|
||||
val acFile = acBase.toFile / request.actionDigest.toString.replace("/", "-")
|
||||
if acFile.exists then
|
||||
val str = IO.read(acFile)
|
||||
val json = Parser.parseUnsafe(str)
|
||||
try
|
||||
val str = IO.read(acFile)
|
||||
val json = Parser.parseUnsafe(str)
|
||||
val value = Converter.fromJsonUnsafe[ActionResult](json)
|
||||
if request.inlineOutputFiles.isEmpty then Right(value)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue