diff options
author | bronzdoc <lsagastume1990@gmail.com> | 2020-04-26 11:55:37 -0600 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 14:13:29 +0900 |
commit | 7fb694fdb0fb56f8e2b3bf800c5f7117f0400f0d (patch) | |
tree | 1116f3a3420849ad33ac66e295ae1412a6eebcb6 /lib | |
parent | b454b4e3107921348bc13f8c024239f82965ed4a (diff) | |
download | ruby-7fb694fdb0fb56f8e2b3bf800c5f7117f0400f0d.tar.gz |
[rubygems/rubygems] Show gemspec location when a Gem::MissingSpecError is raised while trying to activate a gem
https://github.com/rubygems/rubygems/commit/4da54a8e8b
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/specification.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index ad988a5a1e..bcb5da52a3 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1395,7 +1395,11 @@ class Gem::Specification < Gem::BasicSpecification raise e end - specs = spec_dep.to_specs + begin + specs = spec_dep.to_specs + rescue Gem::MissingSpecError => e + raise Gem::MissingSpecError.new(e.name, e.requirement, "at: #{self.spec_file}") + end if specs.size == 1 specs.first.activate |