diff options
-rw-r--r-- | lib/bundler/cli/doctor.rb | 8 | ||||
-rw-r--r-- | spec/commands/doctor_spec.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb index b00e5ba4e0..728662024b 100644 --- a/lib/bundler/cli/doctor.rb +++ b/lib/bundler/cli/doctor.rb @@ -79,11 +79,11 @@ module Bundler if broken_links.any? message = "The following gems are missing OS dependencies:" - broken_links.each do |spec, paths| - paths.uniq.each do |path| - message += "\n * #{spec.name}: #{path}" + broken_links.map do |spec, paths| + paths.uniq.map do |path| + "\n * #{spec.name}: #{path}" end - end + end.flatten.sort.each {|m| message += m } raise ProductionError, message else Bundler.ui.info "No issues found with the installed bundle" diff --git a/spec/commands/doctor_spec.rb b/spec/commands/doctor_spec.rb index d17ea7cedf..8debeb55e4 100644 --- a/spec/commands/doctor_spec.rb +++ b/spec/commands/doctor_spec.rb @@ -57,8 +57,8 @@ describe "bundle doctor" do allow(File).to receive(:exist?).with("/usr/local/opt/icu4c/lib/libicui18n.57.1.dylib").and_return(false) expect { doctor.run }.to raise_error Bundler::ProductionError, strip_whitespace(<<-E).strip The following gems are missing OS dependencies: - * rack: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib * bundler: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib + * rack: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib E end end |