diff --git a/scripts/xunit.go b/scripts/xunit.go index 3fe3fd714..545702d93 100644 --- a/scripts/xunit.go +++ b/scripts/xunit.go @@ -41,8 +41,10 @@ func main() { } else { fmt.Fprintf(os.Stderr, "tparse error: %v\n\n", err) } + defer os.Exit(1) + } else { + defer os.Exit(pkgs.ExitCode()) } - defer os.Exit(pkgs.ExitCode()) output, err := os.Create(*xunit) if err != nil {