Don't blow up if there are no env tags

This commit is contained in:
Donal McBreen
2024-05-20 10:50:07 +01:00
parent 448349d0e5
commit 17dcaccb6a

View File

@@ -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)