mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Return list of installed plugins
This commit is contained in:
parent
c02baa9219
commit
cd04e4385f
2 changed files with 4 additions and 4 deletions
2
Gemfile
2
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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue