summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-03-31 12:44:18 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-03 20:57:19 -0500
commit3d2a6fe2b38c5f01c6352bc356091845a1435a5b (patch)
tree8b19e1a43023def8bed49274c48ec18bc4090bb5
parent7775e261be952d3eb5aeb067932e98472fdd4d77 (diff)
downloadbundler-3d2a6fe2b38c5f01c6352bc356091845a1435a5b.tar.gz
[Definition] Only print change reason if it is non-empty
-rw-r--r--lib/bundler/definition.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index a4aebe95ed..8d8e50aead 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -464,7 +464,8 @@ module Bundler
changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
end
- msg << "\n\n#{change_reason.split(", ").join("\n")}\n"
+ reason = change_reason
+ msg << "\n\n#{reason.split(", ").join("\n")}\n" unless reason.strip.empty?
msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?