From 5230b1ffbcb2d48aac59abf6f658d5b04e276eed Mon Sep 17 00:00:00 2001 From: Daniel Stinson-Diess Date: Tue, 29 Oct 2024 17:28:06 -0500 Subject: [PATCH] feat(cmd): log test transform errors to stderr --- cmd/substation/test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/substation/test.go b/cmd/substation/test.go index 7a47477c..1c38af3f 100644 --- a/cmd/substation/test.go +++ b/cmd/substation/test.go @@ -268,17 +268,17 @@ func testFile(arg string, extVars map[string]string) error { sMsgs, err := setup.Transform(ctx, message.New().AsControl()) if err != nil { - fmt.Printf("?\t%s\t[test error]\n", arg) + fmt.Printf("?\t%s\t[test.transform error]\n", arg) + fmt.Fprintf(os.Stderr, "\t\t%v\n", err) - //nolint:nilerr // errors should not disrupt the test. return nil } tMsgs, err := tester.Transform(ctx, sMsgs...) if err != nil { - fmt.Printf("?\t%s\t[config error]\n", arg) + fmt.Printf("?\t%s\t[transform error]\n", arg) + fmt.Fprintf(os.Stderr, "\t\t%v\n", err) - //nolint:nilerr // errors should not disrupt the test. return nil }