diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-16 19:18:38 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-16 19:18:38 -0500 |
commit | 247e6ec9c03a13f66de762f9fffd267da78494ed (patch) | |
tree | 0e51e58b35df7a013c39f31d4d055463c7394c56 /lib/bundler/cli | |
parent | 862cd36a6f02739ac74a4f3a4f114bdfe9a6701e (diff) | |
download | bundler-247e6ec9c03a13f66de762f9fffd267da78494ed.tar.gz |
[Doctor] Use check to ensure all dependencies are installed
Diffstat (limited to 'lib/bundler/cli')
-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 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) } |