Method: Mrsk::Utils#argumentize_env_with_secrets
- Defined in:
- lib/mrsk/utils.rb
#argumentize_env_with_secrets(env) ⇒ Object
Return a list of shell arguments using the same named argument against the passed attributes, but redacts and expands secrets.
21 22 23 24 25 26 27 |
# File 'lib/mrsk/utils.rb', line 21 def argumentize_env_with_secrets(env) if (secrets = env["secret"]).present? argumentize("-e", secrets.to_h { |key| [ key, ENV.fetch(key) ] }, sensitive: true) + argumentize("-e", env["clear"]) else argumentize "-e", env.fetch("clear", env) end end |