Save point - broken
This commit is contained in:
parent
703458800c
commit
88bcb0378e
@ -158,8 +158,12 @@ func (c *Command) ExecuteOfni(trm terminal.UI) int64 {
|
||||
|
||||
func (c *Command) ExecuteUseHostPlugin(trm terminal.UI, host plugincore.Host) int64 {
|
||||
trm.Output("I'm going to use a the host plugin to do something!")
|
||||
host.HasCapability("write_hello")
|
||||
if ok, _ := host.HasCapability("write_hello"); ok {
|
||||
trm.Output("Writing to file using `write_hello` capability")
|
||||
host.Capability("write_hello", argmapper.Typed(trm))
|
||||
} else {
|
||||
trm.Output("no `write_hello` capability found")
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import (
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/component"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/core"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/datadir"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/internal-shared/componentprotomappers"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/internal-shared/protomappers"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/terminal"
|
||||
@ -95,7 +96,8 @@ func NewBasis(ctx context.Context, opts ...BasisOption) (b *Basis, err error) {
|
||||
|
||||
// If the mappers aren't already set, load known mappers
|
||||
if len(b.mappers) == 0 {
|
||||
b.mappers, err = argmapper.NewFuncList(protomappers.All,
|
||||
mappers := append(protomappers.All, componentprotomappers.All...)
|
||||
b.mappers, err = argmapper.NewFuncList(mappers,
|
||||
argmapper.Logger(b.logger),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@ -20,6 +20,7 @@ import (
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk"
|
||||
"github.com/hashicorp/vagrant-plugin-sdk/terminal"
|
||||
|
||||
alwaysTrueHost "github.com/hashicorp/vagrant/builtin/myplugin/host"
|
||||
"github.com/hashicorp/vagrant/internal/config"
|
||||
"github.com/hashicorp/vagrant/internal/factory"
|
||||
"github.com/hashicorp/vagrant/internal/plugin"
|
||||
@ -232,7 +233,13 @@ func (p *Project) Components(ctx context.Context) (results []*Component, err err
|
||||
func (p *Project) Run(ctx context.Context, task *vagrant_server.Task) (err error) {
|
||||
p.logger.Debug("running new task", "project", p, "task", task)
|
||||
|
||||
hostPluginName, err := p.findHostPlugin(ctx)
|
||||
if hostPluginName != "" {
|
||||
|
||||
}
|
||||
cmd, err := p.basis.component(ctx, component.CommandType, task.Component.Name)
|
||||
// hostPlugin, err := p.basis.component(ctx, component.HostType, hostPluginName)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// disable in process plugins by default for now
|
||||
const IN_PROCESS_PLUGINS = false
|
||||
const IN_PROCESS_PLUGINS = true
|
||||
|
||||
var (
|
||||
// Builtins is the map of all available builtin plugins and their
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user