diff options
author | The Bundler Bot <bot@bundler.io> | 2017-05-29 22:00:51 +0000 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-01 23:55:32 -0500 |
commit | 3a2f26d99b9b66d3a6cc0a44fcdeda39bb326f39 (patch) | |
tree | 9de9da82ba9eaf7bbf506f549ade3b4b7ecda2da /lib | |
parent | 08cbe2b6ea6a1019a72c8de7838c56ade9c1e814 (diff) | |
download | bundler-3a2f26d99b9b66d3a6cc0a44fcdeda39bb326f39.tar.gz |
Auto merge of #5679 - bundler:seg-env-no-settings, r=indirect
[Env] Print well-formed markdown when there are no settings
Closes #5677
(cherry picked from commit c37ede0a2a233eca23f5dfb121260f13eea3541c)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/env.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb index 284cc2ff30..8b990baf40 100644 --- a/lib/bundler/env.rb +++ b/lib/bundler/env.rb @@ -29,14 +29,16 @@ module Bundler out << "```\n" - out << "\n## Bundler settings\n\n```\n" unless Bundler.settings.all.empty? - Bundler.settings.all.each do |setting| - out << setting << "\n" - Bundler.settings.pretty_values_for(setting).each do |line| - out << " " << line << "\n" + unless Bundler.settings.all.empty? + out << "\n## Bundler settings\n\n```\n" + Bundler.settings.all.each do |setting| + out << setting << "\n" + Bundler.settings.pretty_values_for(setting).each do |line| + out << " " << line << "\n" + end end + out << "```\n" end - out << "```\n" return out unless SharedHelpers.in_bundle? |