From 17dcaccb6acb1e6ca1fe8b6a20eecb2237a8e7c7 Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Mon, 20 May 2024 10:50:07 +0100 Subject: [PATCH] Don't blow up if there are no env tags --- lib/kamal/configuration.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/kamal/configuration.rb b/lib/kamal/configuration.rb index 5b5878c3..b82d3965 100644 --- a/lib/kamal/configuration.rb +++ b/lib/kamal/configuration.rb @@ -234,7 +234,11 @@ class Kamal::Configuration end def env_tags - raw_config.env["tags"].collect { |name, config| Kamal::Configuration::Env::Tag.new(name, config: config) } + @env_tags ||= if (tags = raw_config.env["tags"]) + tags.collect { |name, config| Kamal::Configuration::Env::Tag.new(name, config: config) } + else + [] + end end def env_tag(name)