diff --git a/builtin/myplugin/command/command.go b/builtin/myplugin/command/command.go index f9d07dad4..33b5262cb 100644 --- a/builtin/myplugin/command/command.go +++ b/builtin/myplugin/command/command.go @@ -37,7 +37,7 @@ func (c *Command) Documentation() (*docs.Documentation, error) { } // ExecuteFunc implements component.Command -func (c *Command) ExecuteFunc(name []string) interface{} { +func (c *Command) ExecuteFunc([]string) interface{} { return c.Execute } diff --git a/builtin/myplugin/command/dothing.go b/builtin/myplugin/command/dothing.go index f3afe7e9e..2ba8e82af 100644 --- a/builtin/myplugin/command/dothing.go +++ b/builtin/myplugin/command/dothing.go @@ -35,7 +35,7 @@ func (c *DoThing) Documentation() (*docs.Documentation, error) { } // ExecuteFunc implements component.Command -func (c *DoThing) ExecuteFunc(name []string) interface{} { +func (c *DoThing) ExecuteFunc([]string) interface{} { return c.Execute } diff --git a/builtin/myplugin/command/info.go b/builtin/myplugin/command/info.go index 24e33cb54..0e7f63055 100644 --- a/builtin/myplugin/command/info.go +++ b/builtin/myplugin/command/info.go @@ -37,7 +37,7 @@ func (c *Info) Documentation() (*docs.Documentation, error) { } // ExecuteFunc implements component.Command -func (c *Info) ExecuteFunc(name []string) interface{} { +func (c *Info) ExecuteFunc([]string) interface{} { return c.Execute } diff --git a/internal/core/basis.go b/internal/core/basis.go index 7fde19469..b02771ff7 100644 --- a/internal/core/basis.go +++ b/internal/core/basis.go @@ -87,9 +87,6 @@ func (b *Basis) Init() (result *vagrant_server.Job_InitResult, err error) { f := b.factories[component.CommandType] result = &vagrant_server.Job_InitResult{} for _, name := range f.Registered() { - if name != "myplugin" { - continue - } c, err := componentCreatorMap[component.CommandType].Create(context.Background(), b, name) if err != nil { b.logger.Error("failed to start plugin", "name", name, "error", err) diff --git a/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb b/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb index b59c8c62e..66e7d5573 100644 --- a/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb +++ b/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb @@ -143,8 +143,8 @@ module Hashicorp rpc :Documentation, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Config::Documentation rpc :ExecuteSpec, ::Hashicorp::Vagrant::Sdk::Command::SpecReq, ::Hashicorp::Vagrant::Sdk::FuncSpec rpc :Execute, ::Hashicorp::Vagrant::Sdk::Command::ExecuteReq, ::Hashicorp::Vagrant::Sdk::Command::ExecuteResp - rpc :CommandInfoSpec, ::Hashicorp::Vagrant::Sdk::Command::SpecReq, ::Hashicorp::Vagrant::Sdk::FuncSpec - rpc :CommandInfo, ::Hashicorp::Vagrant::Sdk::Command::CommandInfoReq, ::Hashicorp::Vagrant::Sdk::Command::CommandInfoResp + rpc :CommandInfoSpec, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::FuncSpec + rpc :CommandInfo, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Command::CommandInfoResp end Stub = Service.rpc_stub_class diff --git a/plugins/commands/serve/service/command_service.rb b/plugins/commands/serve/service/command_service.rb index 9e77c37c0..a67da7dee 100644 --- a/plugins/commands/serve/service/command_service.rb +++ b/plugins/commands/serve/service/command_service.rb @@ -245,10 +245,10 @@ module VagrantPlugins def execute(req, ctx) ServiceInfo.with_info(ctx) do |info| plugin_name = info.plugin_name - raw_terminal = req.args.detect { |a| + raw_terminal = req.args.args.detect { |a| a.type == "hashicorp.vagrant.sdk.Args.TerminalUI" }&.value&.value - raw_args = req.args.detect { |a| + raw_args = req.args.args.detect { |a| a.type == "hashicorp.vagrant.sdk.Command.Arguments" }&.value&.value