mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
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:
7
testdata/label_error/Taskfile.yml
vendored
Normal file
7
testdata/label_error/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
foo:
|
||||
label: "foobar"
|
||||
cmds:
|
||||
- "false"
|
||||
1
testdata/label_error/testdata/TestLabel-label_in_error-err-run.golden
vendored
Normal file
1
testdata/label_error/testdata/TestLabel-label_in_error-err-run.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Failed to run task "foobar": exit status 1
|
||||
1
testdata/label_error/testdata/TestLabel-label_in_error.golden
vendored
Normal file
1
testdata/label_error/testdata/TestLabel-label_in_error.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: [foobar] false
|
||||
Reference in New Issue
Block a user