Switch to cmd array so we can redact

This commit is contained in:
David Heinemeier Hansson
2023-01-08 16:20:06 +01:00
parent 4ec04f8959
commit 998525c93d
9 changed files with 81 additions and 45 deletions

View File

@@ -38,8 +38,7 @@ class Mrsk::Configuration
end
def envs
parameterize "-e", \
{ "RAILS_MASTER_KEY" => master_key }.merge(env || {})
parameterize "-e", env if env.present?
end
def labels
@@ -56,6 +55,10 @@ class Mrsk::Configuration
{ user: config.ssh_user || "root", auth_methods: [ "publickey" ] }
end
def master_key
ENV["RAILS_MASTER_KEY"] || File.read(Rails.root.join("config/master.key"))
end
private
attr_accessor :config
@@ -72,8 +75,4 @@ class Mrsk::Configuration
def parameterize(param, hash)
hash.collect { |k, v| "#{param} #{k}=#{v}" }.join(" ")
end
def master_key
ENV["RAILS_MASTER_KEY"] || File.read(Rails.root.join("config/master.key"))
end
end