From 401b9276aeacd98593ad066d0a3ccac6625921da Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 30 Mar 2023 10:18:24 -0500 Subject: [PATCH] chore: clone styles to prevent race (#6888) See https://github.com/coder/coder/actions/runs/4565541977/jobs/8056830691?pr=6885 --- cli/cliui/log.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/cliui/log.go b/cli/cliui/log.go index f76c3d7a16..290dd713d6 100644 --- a/cli/cliui/log.go +++ b/cli/cliui/log.go @@ -35,7 +35,7 @@ func (m cliMessage) String() string { // Warn writes a log to the writer provided. func Warn(wtr io.Writer, header string, lines ...string) { _, _ = fmt.Fprint(wtr, cliMessage{ - Style: Styles.Warn, + Style: Styles.Warn.Copy(), Prefix: "WARN: ", Header: header, Lines: lines, @@ -63,7 +63,7 @@ func Infof(wtr io.Writer, fmtStr string, args ...interface{}) { // Error writes a log to the writer provided. func Error(wtr io.Writer, header string, lines ...string) { _, _ = fmt.Fprint(wtr, cliMessage{ - Style: Styles.Error, + Style: Styles.Error.Copy(), Prefix: "ERROR: ", Header: header, Lines: lines,