mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Show gemspec location when a Gem::MissingSpecError is raised while trying to activate a gem
https://github.com/rubygems/rubygems/commit/4da54a8e8b
This commit is contained in:
parent
b454b4e310
commit
7fb694fdb0
Notes:
git
2020-05-08 14:14:14 +09:00
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -1275,6 +1275,7 @@ class TestGem < Gem::TestCase
|
|||
end
|
||||
|
||||
assert_match %r{Could not find 'b' }, e.message
|
||||
assert_match %r{at: #{a.spec_file}}, e.message
|
||||
end
|
||||
|
||||
def test_self_try_activate_missing_prerelease
|
||||
|
|
Loading…
Add table
Reference in a new issue