Returns errors properly from the consul operator raft list-peers command.

pull/3513/head
James Phillips 2017-09-28 15:37:59 -07:00
parent 4862275525
commit be92c6862d
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 2 additions and 1 deletions

View File

@ -50,9 +50,10 @@ func (c *OperatorRaftListCommand) Run(args []string) int {
result, err := raftListPeers(client, c.BaseCommand.HTTPStale())
if err != nil {
c.UI.Error(fmt.Sprintf("Error getting peers: %v", err))
return 1
}
c.UI.Output(result)
c.UI.Output(result)
return 0
}