Skip to content

Commit 46314a3

Browse files
committed
Improve error when loading files
1 parent bdc3602 commit 46314a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/ari/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,10 @@ func ariMain(cmd *cobra.Command, args []string) int {
262262
fmt.Fprintf(os.Stderr, "File to load %s is not recognized as a path on your system: %v", f, err)
263263
}
264264
ariContext.GoalContext.AssignGlobal("FILE", goal.NewS(path))
265-
_, err = runScript(&mainCliSystem, f)
265+
var v goal.V
266+
v, err = runScript(&mainCliSystem, f)
266267
if err != nil {
267-
fmt.Fprintf(os.Stderr, "Failed to load file %q with error: %v", f, err)
268+
fmt.Fprintf(os.Stderr, "Failed to load file %q with value %v and error: %v", f, v, err)
268269
return 1
269270
}
270271
}

0 commit comments

Comments
 (0)