mirror of https://github.com/hashicorp/consul
parent
e4507ae11e
commit
5ce309a2f7
|
@ -72,13 +72,14 @@ func (c *cmd) Run(args []string) int {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
a := client.Agent()
|
a := client.Agent()
|
||||||
nodeName, err := a.NodeName()
|
|
||||||
if err != nil {
|
|
||||||
c.UI.Error(fmt.Sprintf("Error querying Consul agent: %s", err))
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if !c.enable && !c.disable {
|
if !c.enable && !c.disable {
|
||||||
|
nodeName, err := a.NodeName()
|
||||||
|
if err != nil {
|
||||||
|
c.UI.Error(fmt.Sprintf("Error querying Consul agent: %s", err))
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
// List mode - list nodes/services in maintenance mode
|
// List mode - list nodes/services in maintenance mode
|
||||||
checks, err := a.Checks()
|
checks, err := a.Checks()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue