Skip to content

Commit 83d1e0f

Browse files
committed
Handle preformatted header errors without task prefix
- avoid prepending task key when error is already formatted ([error] prefix) - preserve legacy output for YAML header failures Signed-off-by: Emin <me@emin.chat>
1 parent f1fca50 commit 83d1e0f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/internal/src/mill/internal/Util.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,12 @@ object Util {
369369
case Some(failure) =>
370370
// If there is an associated `Result.Failure` with no prefix, set the prefix to the
371371
// current `keyPrefix` and prefix `error` with `key`
372-
if (failure.tickerPrefix == "")
372+
if (
373+
failure.tickerPrefix == "" && failure.path == null &&
374+
failure.index < 0 && failure.error.startsWith("[error]")
375+
)
376+
failure
377+
else if (failure.tickerPrefix == "")
373378
failure.copy(error = s"$key ${failure.error}", tickerPrefix = keyPrefix)
374379
// If there is an associated `Result.Failure` with its own prefix, preserve it
375380
// and chain together a new `Result.Failure` entry representing the current key

0 commit comments

Comments
 (0)