Skip to content

Commit 5230b1f

Browse files
author
Daniel Stinson-Diess
committed
feat(cmd): log test transform errors to stderr
1 parent cf595c4 commit 5230b1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/substation/test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,17 @@ func testFile(arg string, extVars map[string]string) error {
268268

269269
sMsgs, err := setup.Transform(ctx, message.New().AsControl())
270270
if err != nil {
271-
fmt.Printf("?\t%s\t[test error]\n", arg)
271+
fmt.Printf("?\t%s\t[test.transform error]\n", arg)
272+
fmt.Fprintf(os.Stderr, "\t\t%v\n", err)
272273

273-
//nolint:nilerr // errors should not disrupt the test.
274274
return nil
275275
}
276276

277277
tMsgs, err := tester.Transform(ctx, sMsgs...)
278278
if err != nil {
279-
fmt.Printf("?\t%s\t[config error]\n", arg)
279+
fmt.Printf("?\t%s\t[transform error]\n", arg)
280+
fmt.Fprintf(os.Stderr, "\t\t%v\n", err)
280281

281-
//nolint:nilerr // errors should not disrupt the test.
282282
return nil
283283
}
284284

0 commit comments

Comments
 (0)