diff --git a/Gemfile b/Gemfile index 69495bdbb..565ca7959 100644 --- a/Gemfile +++ b/Gemfile @@ -7,5 +7,3 @@ if File.exist?(File.expand_path("../../vagrant-spec", __FILE__)) else gem 'vagrant-spec', git: "https://github.com/hashicorp/vagrant-spec.git", branch: :main end - -gem "pry-byebug" diff --git a/plugins/commands/serve/service/plugin_service.rb b/plugins/commands/serve/service/plugin_service.rb index 871b35b6c..302ee9c96 100644 --- a/plugins/commands/serve/service/plugin_service.rb +++ b/plugins/commands/serve/service/plugin_service.rb @@ -1,3 +1,5 @@ +require "vagrant/plugin/manager" + require_relative 'proto/gen/ruby-server_pb' require_relative 'proto/gen/ruby-server_services_pb' @@ -6,8 +8,8 @@ module VagrantPlugins module Serve class PluginService < Hashicorp::Vagrant::RubyVagrant::Service def get_plugins(req, _unused_call) - - plugins = [Hashicorp::Vagrant::Plugin.new(name: "test")] + ruby_plugins = Vagrant::Plugin::Manager.instance.installed_plugins + ruby_plugins.map { |k, v| Hashicorp::Vagrant::Plugin.new(name: k) } Hashicorp::Vagrant::GetPluginsResponse.new( plugins: plugins )