summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-05-21 20:22:29 +1000
committerColby Swandale <colby@taplaboratories.com>2017-05-21 20:22:29 +1000
commit128d304ae6a43a83ed710ef483c0a5e3e97b4ac5 (patch)
tree04e82be8d6fc631af00fa6d51bbee24825ec05e0 /lib
parentdc39cb2cd115fd124493b8ab04a21a4ece5d1cf9 (diff)
downloadbundler-128d304ae6a43a83ed710ef483c0a5e3e97b4ac5.tar.gz
fix newline not being added correctly when printing to stderr
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/ui/shell.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 24429d1229..81743ede40 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -105,6 +105,9 @@ module Bundler
end
def tell_err(message, color = nil, newline = nil)
+ newline = message.to_s !~ /( |\t)\Z/ unless newline
+ message = word_wrap(message) if newline.is_a?(Hash) && newline[:wrap]
+
buffer = @shell.send(:prepare_message, message, *color)
buffer << "\n" if newline && !message.to_s.end_with?("\n")