From 96a05645269241587fdcf0f1ccc49ce38047627c Mon Sep 17 00:00:00 2001 From: "Ryan (hackercat)" Date: Mon, 7 Jun 2021 13:54:12 +0000 Subject: [PATCH] fix: don't replace empty secrets (#725) --- pkg/runner/logger.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/runner/logger.go b/pkg/runner/logger.go index 4135662..8464801 100644 --- a/pkg/runner/logger.go +++ b/pkg/runner/logger.go @@ -68,7 +68,9 @@ func (f *stepLogFormatter) Format(entry *logrus.Entry) ([]byte, error) { // Replace any secrets in the entry if insecure-secrets flag is not used if !f.insecureSecrets { for _, v := range f.secrets { - entry.Message = strings.ReplaceAll(entry.Message, v, "***") + if v != "" { + entry.Message = strings.ReplaceAll(entry.Message, v, "***") + } } }