From 9139acca66086d0d6c0867ff02b8cb8c338df5d4 Mon Sep 17 00:00:00 2001 From: DEVRAJ KUMAR <43830009+devraj-kumar@users.noreply.github.com> Date: Sat, 11 Apr 2020 03:50:19 +0530 Subject: [rubygems/rubygems] Fix `bundle info` not indicating a gem which has been deleted, unlike `bundle show` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: David Rodríguez https://github.com/rubygems/rubygems/commit/2851b40ffb --- lib/bundler/cli/info.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb index c79c8bf814..7f4ef0d03a 100644 --- a/lib/bundler/cli/info.rb +++ b/lib/bundler/cli/info.rb @@ -40,10 +40,13 @@ module Bundler end def print_gem_path(spec) - path = if spec.name == "bundler" - File.expand_path("../../../..", __FILE__) + if spec.name == "bundler" + path = File.expand_path("../../../..", __FILE__) else - spec.full_gem_path + path = spec.full_gem_path + unless File.directory?(path) + return Bundler.ui.warn "The gem #{gem_name} has been deleted. It was installed at: #{path}" + end end Bundler.ui.info path -- cgit v1.2.3