зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] filter dependency type and name strictly.
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> https://github.com/rubygems/rubygems/commit/92892bbc3a
This commit is contained in:
Родитель
0b65a7a19e
Коммит
1eb503373e
|
@ -754,7 +754,11 @@ class Gem::Installer
|
|||
raise Gem::InstallError, "#{spec} has an invalid specification_version"
|
||||
end
|
||||
|
||||
if spec.dependencies.any? {|dep| dep.type =~ /\R/ || dep.name =~ /\R/ }
|
||||
if spec.dependencies.any? {|dep| dep.type != :runtime && dep.type != :development }
|
||||
raise Gem::InstallError, "#{spec} has an invalid dependencies"
|
||||
end
|
||||
|
||||
if spec.dependencies.any? {|dep| dep.name =~ /(?:\R|[<>])/ }
|
||||
raise Gem::InstallError, "#{spec} has an invalid dependencies"
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче