utils: make redact_secrets handle nil secrets.

Fixes #6363.
This commit is contained in:
Mike McQuaid 2019-08-13 08:15:24 +01:00
parent 925ec737fb
commit c5c59149c4
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -502,5 +502,7 @@ def command_help_lines(path)
end
def redact_secrets(input, secrets)
secrets.reduce(input) { |str, secret| str.gsub secret, "******" }.freeze
secrets.compact
.reduce(input) { |str, secret| str.gsub secret, "******" }
.freeze
end