Output the host when running accessory details

We already do this for app and Traefik hosts.
This commit is contained in:
Donal McBreen
2024-04-05 12:46:51 +01:00
parent 31669d4dce
commit e6d436f646
2 changed files with 8 additions and 2 deletions

View File

@@ -107,8 +107,9 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
if name == "all"
KAMAL.accessory_names.each { |accessory_name| details(accessory_name) }
else
type = "Accessory #{name}"
with_accessory(name) do |accessory, hosts|
on(hosts) { puts capture_with_info(*accessory.info) }
on(hosts) { puts_by_host host, capture_with_info(*accessory.info), type: type }
end
end
end