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

This commit is contained in:
Gareth George
2025-01-23 20:40:03 -08:00
parent 09449a814a
commit f119e1e979
+3 -2
View File
@@ -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.
}
}