diff --git a/lib/vagrant/plugin/manager.rb b/lib/vagrant/plugin/manager.rb index 8023fbea3..456e7c6ee 100644 --- a/lib/vagrant/plugin/manager.rb +++ b/lib/vagrant/plugin/manager.rb @@ -114,7 +114,13 @@ module Vagrant # # @return [Hash] 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) end diff --git a/test/unit/vagrant/plugin/manager_test.rb b/test/unit/vagrant/plugin/manager_test.rb index 104466e25..d9f38d0e1 100644 --- a/test/unit/vagrant/plugin/manager_test.rb +++ b/test/unit/vagrant/plugin/manager_test.rb @@ -214,7 +214,9 @@ describe Vagrant::Plugin::Manager do expect(plugins.length).to eql(2) expect(plugins).to have_key("foo") 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["bar"]["system"]).to be_true end end end