fix: make task failure errors include stack of running tasks (#2286)

Previously if a task was run as a dependency of another task,
the error message simply reported something like:

    exit status 1

It is desirable instead to name the root task and all child tasks in the tree
to the failing task.

After this PR, the error message will read:

    task: Failed to run task "root": task: Failed to run task "failing-task": exit status 1
This commit is contained in:
Graham Dennis
2025-11-11 11:40:40 -08:00
committed by GitHub
parent b14318ed3f
commit 94f82cbc5a
14 changed files with 39 additions and 15 deletions

View File

@@ -1 +1 @@
task: precondition not met
task: Failed to run task "impossible": task: precondition not met

View File

@@ -1 +1 @@
task: Failed to run task "executes_failing_task_as_cmd": task: precondition not met
task: Failed to run task "executes_failing_task_as_cmd": task: Failed to run task "impossible": task: precondition not met

View File

@@ -1 +1 @@
task: precondition not met
task: Failed to run task "depends_on_impossible": task: Failed to run task "impossible": task: precondition not met