Skip to content

Commit

Permalink
fix testcase and regression in error info
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Worm committed Jun 7, 2024
1 parent d5af107 commit 646beb0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flow/tasker/tasker.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func makeTask(ctx *flowctx.Context, node *hof.Node[any]) (cueflow.Runner, error)
}

if rerr != nil {
err = fmt.Errorf("in %q\n%v\n%+v", c.Value.Path(), cuetils.ExpandCueError(err), value)
rerr = fmt.Errorf("in %q\n%v\n%+v", c.Value.Path(), cuetils.ExpandCueError(rerr), value)
// fmt.Println("RunnerRunc Error:", err)
c.Error = rerr
bt.Error = rerr
Expand Down
5 changes: 5 additions & 0 deletions flow/testdata/tasks/os/flow.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tasks: {
@flow()
r: { filename: "in.txt", contents: string } @task(os.ReadFile)
}

6 changes: 6 additions & 0 deletions flow/testdata/tasks/os/golden.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Error in tasks | tasks: task failed: in "r"
open in.txt: no such file or directory

<nil>

1 error(s) were encountered
2 changes: 2 additions & 0 deletions flow/testdata/tasks/os/readfile_003.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ tasks: {
Error in tasks | tasks: task failed: in "r"
open in.txt: no such file or directory

<nil>

1 error(s) were encountered

0 comments on commit 646beb0

Please sign in to comment.