From 1ed9e25923bb11dc1dbd3ea07b27226f1fb5a4d2 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 11 Mar 2026 12:40:51 +0100 Subject: [PATCH] add nil check here --- cmd/pm/runner.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/pm/runner.go b/cmd/pm/runner.go index 8321957..c9def4a 100644 --- a/cmd/pm/runner.go +++ b/cmd/pm/runner.go @@ -164,6 +164,10 @@ func taskLoop(ctx context.Context, application *task.App, surveyTasks map[string iIdx := idx % len(iNames) selected := interfaces[iNames[iIdx]] + if selected == nil { + return fmt.Errorf("interface %q is nil (available: %v)", iNames[iIdx], iNames) + } + runner := task.NewTaskRunner(application) if err := runner.Run(ctx, t, selected, tasks.InterfaceToType(selected)); err != nil {