Add secret envs

This commit is contained in:
David Heinemeier Hansson
2023-01-21 10:56:24 +01:00
parent 3bf56c2fdb
commit f6ca864e06
4 changed files with 53 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ module Mrsk::Utils
# Return a list of shell arguments using the same named argument against the passed attributes.
def argumentize(argument, attributes, redacted: false)
attributes.flat_map { |k, v| [ argument, redacted ? redact("#{k}=#{v}") : "#{k}=#{v}" ] }
Array(attributes).flat_map { |k, v| [ argument, redacted ? redact("#{k}=#{v}") : "#{k}=#{v}" ] }
end
# Copied from SSHKit::Backend::Abstract#redact to be available inside Commands classes