write task description to file

This commit is contained in:
Robin Olsen
2026-03-19 13:51:46 +01:00
parent b9bf49b269
commit 151d757209

View File

@@ -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
}