From 77146765d7ab50f3b5513109f52fe6b2a8a35ef5 Mon Sep 17 00:00:00 2001 From: Zhongpeng Lin Date: Thu, 14 Oct 2021 08:17:19 -0700 Subject: [PATCH] Print out the coverage HTML file unconditionally --- src/cmd/cover/html.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cmd/cover/html.go b/src/cmd/cover/html.go index 3c1d17e7b95..509e5492be0 100644 --- a/src/cmd/cover/html.go +++ b/src/cmd/cover/html.go @@ -83,9 +83,8 @@ func htmlOutput(profile, outfile string) error { } if outfile == "" { - if !browser.Open("file://" + out.Name()) { - fmt.Fprintf(os.Stderr, "HTML output written to %s\n", out.Name()) - } + fmt.Fprintf(os.Stderr, "HTML output written to %s\n", out.Name()) + browser.Open("file://" + out.Name()) } return nil