diff options
-rw-r--r-- | lib/bundler/cli/doctor.rb | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb index 25ddcf65..b00e5ba4 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) } |