write task description to file
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"charm.land/huh/v2"
|
"charm.land/huh/v2"
|
||||||
@@ -183,6 +184,10 @@ func taskLoop(ctx context.Context, application *task.App, surveyTasks map[string
|
|||||||
|
|
||||||
runner := task.NewTaskRunner(application)
|
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 {
|
if err := runner.Run(ctx, t, selected, tasks.InterfaceToType(selected)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user