From 151d7572091de2968c0e59f98eb995774d6bbed3 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Thu, 19 Mar 2026 13:51:46 +0100 Subject: [PATCH] write task description to file --- cmd/pm/runner.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/pm/runner.go b/cmd/pm/runner.go index 0872e30..a4de2c6 100644 --- a/cmd/pm/runner.go +++ b/cmd/pm/runner.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "math/rand" + "os" "time" "charm.land/huh/v2" @@ -183,6 +184,10 @@ func taskLoop(ctx context.Context, application *task.App, surveyTasks map[string runner := task.NewTaskRunner(application) + if err := os.WriteFile("Task Details.txt", []byte(t.Details(tasks.InterfaceToType(selected)).Description), 0644); err != nil { + return fmt.Errorf("failed to write task details: %w", err) + } + if err := runner.Run(ctx, t, selected, tasks.InterfaceToType(selected)); err != nil { return err }