From e0a44b8317504bd953779495cd77156359b60550 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 7 Nov 2024 05:34:13 -0500 Subject: [PATCH] Use `shell.indent` for list output indentation in CLI area (#31969) --- lib/mastodon/cli/accounts.rb | 4 +++- lib/mastodon/cli/email_domain_blocks.rb | 6 ++++-- lib/mastodon/cli/emoji.rb | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/mastodon/cli/accounts.rb b/lib/mastodon/cli/accounts.rb index 23c907543f..c8e91224cf 100644 --- a/lib/mastodon/cli/accounts.rb +++ b/lib/mastodon/cli/accounts.rb @@ -321,7 +321,9 @@ module Mastodon::CLI unless skip_domains.empty? say('The following domains were not available during the check:', :yellow) - skip_domains.each { |domain| say(" #{domain}") } + shell.indent(2) do + skip_domains.each { |domain| say(domain) } + end end end diff --git a/lib/mastodon/cli/email_domain_blocks.rb b/lib/mastodon/cli/email_domain_blocks.rb index 6b9107c8ad..4aa31f8af8 100644 --- a/lib/mastodon/cli/email_domain_blocks.rb +++ b/lib/mastodon/cli/email_domain_blocks.rb @@ -10,8 +10,10 @@ module Mastodon::CLI EmailDomainBlock.where(parent_id: nil).find_each do |entry| say(entry.domain.to_s, :white) - EmailDomainBlock.where(parent_id: entry.id).find_each do |child| - say(" #{child.domain}", :cyan) + shell.indent do + EmailDomainBlock.where(parent_id: entry.id).find_each do |child| + say(child.domain, :cyan) + end end end end diff --git a/lib/mastodon/cli/emoji.rb b/lib/mastodon/cli/emoji.rb index 4a8949de0e..206961f854 100644 --- a/lib/mastodon/cli/emoji.rb +++ b/lib/mastodon/cli/emoji.rb @@ -62,7 +62,9 @@ module Mastodon::CLI failed += 1 say('Failure/Error: ', :red) say(entry.full_name) - say(" #{custom_emoji.errors[:image].join(', ')}", :red) + shell.indent(2) do + say(custom_emoji.errors[:image].join(', '), :red) + end end end end