core: plugin manager marks system gems as system
This commit is contained in:
parent
efddef0a80
commit
b5637da6c4
|
@ -114,7 +114,13 @@ module Vagrant
|
||||||
#
|
#
|
||||||
# @return [Hash]
|
# @return [Hash]
|
||||||
def installed_plugins
|
def installed_plugins
|
||||||
system = @system_file ? @system_file.installed_plugins : {}
|
system = {}
|
||||||
|
if @system_file
|
||||||
|
@system_file.installed_plugins.each do |k, v|
|
||||||
|
system[k] = v.merge("system" => true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
system.merge(@user_file.installed_plugins)
|
system.merge(@user_file.installed_plugins)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,9 @@ describe Vagrant::Plugin::Manager do
|
||||||
expect(plugins.length).to eql(2)
|
expect(plugins.length).to eql(2)
|
||||||
expect(plugins).to have_key("foo")
|
expect(plugins).to have_key("foo")
|
||||||
expect(plugins["foo"]["gem_version"]).to eq("0.1.0")
|
expect(plugins["foo"]["gem_version"]).to eq("0.1.0")
|
||||||
|
expect(plugins["foo"]["system"]).to be_false
|
||||||
expect(plugins).to have_key("bar")
|
expect(plugins).to have_key("bar")
|
||||||
|
expect(plugins["bar"]["system"]).to be_true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue