fix: don't replace empty secrets (#725)
This commit is contained in:
parent
33ccfa6f3b
commit
96a0564526
1 changed files with 3 additions and 1 deletions
|
@ -68,9 +68,11 @@ func (f *stepLogFormatter) Format(entry *logrus.Entry) ([]byte, error) {
|
||||||
// Replace any secrets in the entry if insecure-secrets flag is not used
|
// Replace any secrets in the entry if insecure-secrets flag is not used
|
||||||
if !f.insecureSecrets {
|
if !f.insecureSecrets {
|
||||||
for _, v := range f.secrets {
|
for _, v := range f.secrets {
|
||||||
|
if v != "" {
|
||||||
entry.Message = strings.ReplaceAll(entry.Message, v, "***")
|
entry.Message = strings.ReplaceAll(entry.Message, v, "***")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if f.isColored(entry) {
|
if f.isColored(entry) {
|
||||||
f.printColored(b, entry)
|
f.printColored(b, entry)
|
||||||
|
|
Loading…
Reference in a new issue