mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Make join exit non-zero if no nodes were joined
This commit is contained in:
parent
14a7ffc098
commit
746dbc1c51
@ -57,6 +57,11 @@ func (c *JoinCommand) Run(args []string) int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if joins == 0 {
|
||||||
|
c.Ui.Error("Failed to join any nodes.")
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
c.Ui.Output(fmt.Sprintf(
|
c.Ui.Output(fmt.Sprintf(
|
||||||
"Successfully joined cluster by contacting %d nodes.", joins))
|
"Successfully joined cluster by contacting %d nodes.", joins))
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user