Multiple matched objects now treated as an error condition.

This commit is contained in:
Alex Dadgar
2017-07-20 17:31:07 -07:00
parent d104ccce6b
commit 3cd8d50bbc
17 changed files with 34 additions and 34 deletions

View File

@@ -231,8 +231,8 @@ func (c *NodeStatusCommand) Run(args []string) int {
node.Status)
}
// Dump the output
c.Ui.Output(fmt.Sprintf("Prefix matched multiple nodes\n\n%s", formatList(out)))
return 0
c.Ui.Error(fmt.Sprintf("Prefix matched multiple nodes\n\n%s", formatList(out)))
return 1
}
// Prefix lookup matched a single node
node, _, err := client.Nodes().Info(nodes[0].ID, nil)