diff --git a/main/src/main/scala/sbt/Extracted.scala b/main/src/main/scala/sbt/Extracted.scala index 3e86eee07..ac5799901 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.