Merge hashes to de-dupe the app and role envs.

This is better then adding them together which confusingly results in
both ENV vars in the same file, though based on the load order, they
worked anyway.
This commit is contained in:
Matthew Kent
2023-11-28 15:51:32 -08:00
parent a155b7baab
commit 7fa53d90bd
2 changed files with 29 additions and 1 deletions

View File

@@ -239,7 +239,7 @@ class Kamal::Configuration::Role
clear_app_env = config.env["secret"] ? Array(config.env["clear"]) : Array(config.env["clear"] || config.env)
clear_role_env = specialized_env["secret"] ? Array(specialized_env["clear"]) : Array(specialized_env["clear"] || specialized_env)
new_env["clear"] = (clear_app_env + clear_role_env).uniq
new_env["clear"] = clear_app_env.to_h.merge(clear_role_env.to_h)
end
end