-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Epic: #33
When a task is defined multiple times within the same snowblock configuration file, only the last object is processed while any object before are ignored.
The root cause is the pkg/snowblock.TaskRunnerMapping custom type that only accepts one pkg/api.TaskConfiguration object.
Therefore any parsed task object of the same type is overriden by tasks that are parsed after that task resulting in missing tasks.
Running this example configuration will not process the first clean task but only the second one:
[
{
"clean": ["~/desktop/failure"]
},
{
"link": {
"~/desktop/success/config.json": {
"create": true,
"path": "config.json"
}
}
},
{
"clean": ["~/desktop/success"]
},
]To fix this problem the pkg/snowblock.TaskRunnerMapping type should accept multiple pkg/api.TaskConfiguration objects (TaskRunnerMapping map[api.TaskRunner][]api.TaskConfiguration) instead of only one so the previous object won't be overridden.