Check plugin name with version spec in has_plugin
If one passes a version spec to `Vagrant.has_plugin?`, the actual plugin name is ignored and any installed plugin which matches the version spec makes the check pass. Fix this by also checking for plugin name match in addition to the requested version spec.
This commit is contained in:
parent
4cd767afcc
commit
cca19f8241
|
@ -156,7 +156,7 @@ module Vagrant
|
|||
Plugin::Manager.instance.installed_specs.any? do |s|
|
||||
match = s.name == name
|
||||
next match if !version
|
||||
next version.satisfied_by?(s.version)
|
||||
next match && version.satisfied_by?(s.version)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue