mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-09-23 00:15:45 +00:00
fix: hooks fail to populate a non-nil Plan variable for system tasks
Build Snapshot Release / build (push) Has been cancelled
Docs / build (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled
Docs / deploy (push) Has been cancelled
Build Snapshot Release / build (push) Has been cancelled
Docs / build (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled
Docs / deploy (push) Has been cancelled
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