summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-16 19:18:38 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-16 19:18:38 -0500
commit247e6ec9c03a13f66de762f9fffd267da78494ed (patch)
tree0e51e58b35df7a013c39f31d4d055463c7394c56
parent862cd36a6f02739ac74a4f3a4f114bdfe9a6701e (diff)
downloadbundler-247e6ec9c03a13f66de762f9fffd267da78494ed.tar.gz
[Doctor] Use check to ensure all dependencies are installed
-rw-r--r--lib/bundler/cli/doctor.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index 25ddcf65c3..b00e5ba4e0 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -55,22 +55,18 @@ module Bundler
Dir.glob("#{spec.full_gem_path}/**/*.bundle")
end
+ def check!
+ require "bundler/cli/check"
+ Bundler::CLI::Check.new({}).run
+ end
+
def run
Bundler.ui.level = "error" if options[:quiet]
+ check!
+ definition = Bundler.definition
broken_links = {}
- begin
- definition = Bundler.definition
- definition.validate_ruby!
- not_installed = definition.missing_specs
- raise GemNotFound if not_installed.any?
- rescue GemNotFound
- Bundler.ui.warn "This bundle's gems must be installed to run this command."
- Bundler.ui.warn "Install missing gems with `bundle install`."
- exit 0
- end
-
definition.specs.each do |spec|
bundles_for_gem(spec).each do |bundle|
bad_paths = dylibs(bundle).select {|f| !File.exist?(f) }