Skip to content

Commit

Permalink
Use shell.indent for list output indentation in CLI area (mastodon#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Nov 7, 2024
1 parent 68b545e commit e0a44b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/mastodon/cli/accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,9 @@ def cull(*domains)

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

Expand Down
6 changes: 4 additions & 2 deletions lib/mastodon/cli/email_domain_blocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ def list
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
Expand Down
4 changes: 3 additions & 1 deletion lib/mastodon/cli/emoji.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def import(path)
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
Expand Down

0 comments on commit e0a44b8

Please sign in to comment.