From f8903ab37a353fde709a8c06bf0c338434ac96d4 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Mon, 15 Sep 2025 11:17:19 -0500 Subject: [PATCH] Add runTaskUnhandled to Extracted --- main/src/main/scala/sbt/Extracted.scala | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main/src/main/scala/sbt/Extracted.scala b/main/src/main/scala/sbt/Extracted.scala index 3e86eee07..a7d8e964d 100644 --- a/main/src/main/scala/sbt/Extracted.scala +++ b/main/src/main/scala/sbt/Extracted.scala @@ -66,6 +66,15 @@ final case class Extracted( (newS, EvaluateTask.processResult2(result)) } + /** + * Runs the task specified by `key` and returns the unhandled direct result of EvaluateTask. + * + * This method differs from `runTask` in that it does not unwrap the option, or process results. + */ + def runTaskUnhandled[T](key: TaskKey[T], state: State): Option[(State, Result[T])] = + val config = extractedTaskConfig(this, structure, state) + EvaluateTask(structure, key.scopedKey, state, currentRef, config) + /** * Runs the input task specified by `key`, using the `input` as the input to it, and returns the transformed State * and the resulting value of the input task.