Commit 9ca5e278 authored by Eloy Durán's avatar Eloy Durán

Merge pull request #2844 from CocoaPods/fix/2603

Fixing #2603 formatting issue
parents ffb2a0bf 67f0e118
...@@ -16,6 +16,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -16,6 +16,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* Fix an output formatting issue with various commands like `pod search`
and `pod trunk`.
[Olivier Halligon](https://github.com/AliSoftware)
[#2603](https://github.com/CocoaPods/CocoaPods/issues/2603)
* Show a helpful error message if the old resolver incorrectly activated a * Show a helpful error message if the old resolver incorrectly activated a
pre-release version that now leads to a version conflict. pre-release version that now leads to a version conflict.
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
......
...@@ -191,17 +191,22 @@ module Pod ...@@ -191,17 +191,22 @@ module Pod
# Prints a message with a label. # Prints a message with a label.
# #
def labeled(label, value, justification = 16) def labeled(label, value, justification = 12)
if value if value
''.tap do |t| title = "- #{label}:".ljust(justification)
t << " - #{label}:".ljust(justification) output = begin
if value.is_a?(Array) if value.is_a?(Array)
separator = "\n - " lines = [wrap_string(title, self.indentation_level)]
puts_indented t << separator << value.join(separator) value.each do |v|
lines << wrap_string("- #{v}", self.indentation_level + 2)
end
lines.join("\n")
else else
puts_indented t << value.to_s << "\n" wrap_string(title + "#{value}", self.indentation_level)
end end + "\n"
end end
puts output
output
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment