Move `IO.read` and `Parser.parseUnsafe` calls inside `try`.

This commit is contained in:
Matt Dziuban 2025-10-07 13:28:10 -04:00
parent a8f8aa41fa
commit c660c56644
1 changed files with 2 additions and 2 deletions

View File

@ -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