Exit with error code 1 when failing to list DCs (#4583)

Fixes #4582.
This commit is contained in:
Benjamin Sago 2018-09-12 17:55:02 +01:00 committed by Jack Pearkes
parent 5943c79ed4
commit 20645c8459
1 changed files with 1 additions and 0 deletions

View File

@ -49,6 +49,7 @@ func (c *cmd) Run(args []string) int {
dcs, err := client.Catalog().Datacenters() dcs, err := client.Catalog().Datacenters()
if err != nil { if err != nil {
c.UI.Error(fmt.Sprintf("Error listing datacenters: %s", err)) c.UI.Error(fmt.Sprintf("Error listing datacenters: %s", err))
return 1
} }
for _, dc := range dcs { for _, dc := range dcs {