mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Update builtin command to load target from project
This commit is contained in:
parent
6e1dc229bb
commit
3bbab430bc
1 changed files with 7 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ func (c *Command) ExecuteThing(trm terminal.UI, flags map[string]interface{}) in
|
|||
return 0
|
||||
}
|
||||
|
||||
func (c *Command) ExecuteInfo(trm terminal.UI, p plugincore.Project, t plugincore.Target) int32 {
|
||||
func (c *Command) ExecuteInfo(trm terminal.UI, p plugincore.Project) int32 {
|
||||
mn, _ := p.MachineNames()
|
||||
trm.Output("\nMachines in this project")
|
||||
trm.Output(strings.Join(mn[:], "\n"))
|
||||
|
|
@ -133,6 +133,12 @@ func (c *Command) ExecuteInfo(trm terminal.UI, p plugincore.Project, t plugincor
|
|||
ptrm.Output("YAY! This is project specific output!")
|
||||
}
|
||||
|
||||
t, err := p.Target("one")
|
||||
if err != nil {
|
||||
trm.Output("Failed to load `one' target -- " + err.Error())
|
||||
return 1
|
||||
}
|
||||
|
||||
m, err := t.Specialize((*plugincore.Machine)(nil))
|
||||
if err != nil {
|
||||
trm.Output("Failed to specialize to machine! -- " + err.Error())
|
||||
|
|
|
|||
Loading…
Reference in a new issue