mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-09-23 08:25:40 +00:00
fix: hooks fail to populate a non-nil Plan variable for system tasks
This commit is contained in:
@@ -103,9 +103,10 @@ func (t *taskRunnerImpl) ExecuteHooks(ctx context.Context, events []v1.Hook_Cond
|
||||
if planID != "" {
|
||||
plan, _ = t.findPlan()
|
||||
vars.Plan = plan
|
||||
} else {
|
||||
}
|
||||
if vars.Plan == nil {
|
||||
vars.Plan = &v1.Plan{
|
||||
Id: tasks.PlanForUnassociatedOperations,
|
||||
Id: t.t.PlanID(), // make a fake plan that conveys only the ID, e.g. for unassociated operations OR system plan.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user