From c660c5664472a7f7f88258074cd6345344ec97e4 Mon Sep 17 00:00:00 2001 From: Matt Dziuban Date: Tue, 7 Oct 2025 13:28:10 -0400 Subject: [PATCH] Move `IO.read` and `Parser.parseUnsafe` calls inside `try`. --- util-cache/src/main/scala/sbt/util/ActionCacheStore.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-cache/src/main/scala/sbt/util/ActionCacheStore.scala b/util-cache/src/main/scala/sbt/util/ActionCacheStore.scala index 530e958ed..7fb6e479f 100644 --- a/util-cache/src/main/scala/sbt/util/ActionCacheStore.scala +++ b/util-cache/src/main/scala/sbt/util/ActionCacheStore.scala @@ -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