Merge pull request #6364 from MikeMcQuaid/redact-empty-secrets

utils: make redact_secrets handle `nil` secrets.
This commit is contained in:
Mike McQuaid 2019-08-13 14:11:19 +01:00 committed by GitHub
commit fe954c76d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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