Specify which command to get command info from
This commit is contained in:
parent
9f51d87038
commit
4dce4d148d
@ -42,7 +42,7 @@ func (c *Command) ExecuteFunc([]string) interface{} {
|
||||
}
|
||||
|
||||
// CommandInfoFunc implements component.Command
|
||||
func (c *Command) CommandInfoFunc() interface{} {
|
||||
func (c *Command) CommandInfoFunc([]string) interface{} {
|
||||
return c.CommandInfo
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ func (c *DoThing) ExecuteFunc([]string) interface{} {
|
||||
}
|
||||
|
||||
// CommandInfoFunc implements component.Command
|
||||
func (c *DoThing) CommandInfoFunc() interface{} {
|
||||
func (c *DoThing) CommandInfoFunc([]string) interface{} {
|
||||
return c.CommandInfo
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ func (c *Info) ExecuteFunc([]string) interface{} {
|
||||
}
|
||||
|
||||
// CommandInfoFunc implements component.Command
|
||||
func (c *Info) CommandInfoFunc() interface{} {
|
||||
func (c *Info) CommandInfoFunc([]string) interface{} {
|
||||
return c.CommandInfo
|
||||
}
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ func (b *Basis) Init() (result *vagrant_server.Job_InitResult, err error) {
|
||||
continue
|
||||
}
|
||||
b.logger.Trace("started a new plugin for init", "name", name)
|
||||
cmdInfo, err := cmd.CommandInfo()
|
||||
cmdInfo, err := cmd.CommandInfo([]string{name})
|
||||
if err != nil {
|
||||
b.logger.Error("failed to get command info for command "+name, "error", err)
|
||||
}
|
||||
|
||||
@ -200,7 +200,6 @@ func (p *Project) specializeComponent(c *Component) (cmp plugin.PluginMetadata,
|
||||
func (p *Project) Run(ctx context.Context, task *vagrant_server.Task) (err error) {
|
||||
p.logger.Debug("running new task", "project", p, "task", task)
|
||||
|
||||
// componentName := strings.Split(task.Component.Name, " ")[0]
|
||||
cmd, err := p.basis.component(ctx, component.CommandType, task.Component.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user