Merge pull request #3513 from hashicorp/list-peers-error

Returns errors properly from the consul operator raft list-peers comm…
This commit is contained in:
James Phillips 2017-09-28 15:39:00 -07:00 committed by GitHub
commit 068d04c417
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
}