From 4860e85b82bc62b46e6c5e430bd6c951994df981 Mon Sep 17 00:00:00 2001 From: Christian Walter Date: Tue, 23 Jan 2024 17:59:43 +0100 Subject: [PATCH] fix(cmd): bg-suite should not return an error in non-interactive mode Signed-off-by: Christian Walter --- cmd/bg-suite/cmd.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/bg-suite/cmd.go b/cmd/bg-suite/cmd.go index a98a13c4..cafff018 100644 --- a/cmd/bg-suite/cmd.go +++ b/cmd/bg-suite/cmd.go @@ -164,7 +164,13 @@ func run(testGroup string, tests []*test.Test, preset *test.PreSet, interactive } } data, _ := json.MarshalIndent(t, "", "") - os.WriteFile(logfile, data, 0o664) + err := os.WriteFile(logfile, data, 0o664) + if err != nil { + fmt.Println("Error writing log file") + } + + // If not interactive, we just print the results and return + result = true } for index := range tests {