Skip to content

Commit

Permalink
Merge pull request #1196 from tiramizoo/role-accessories-msg
Browse files Browse the repository at this point in the history
Improve error on unknown role in accessories config.
  • Loading branch information
djmb authored Nov 21, 2024
2 parents a4ab34d + e4ab2a0 commit 1a86b3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/kamal/configuration/accessory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def hosts_from_hosts

def hosts_from_roles
if accessory_config.key?("roles")
accessory_config["roles"].flat_map { |role| config.role(role).hosts }
accessory_config["roles"].flat_map do |role|
config.role(role)&.hosts || raise(Kamal::ConfigurationError, "Unknown role in accessories config: '#{role}'")
end
end
end

Expand Down

0 comments on commit 1a86b3a

Please sign in to comment.