Make join exit non-zero if no nodes were joined
This commit is contained in:
parent
b35acaac33
commit
2a82804c0c
|
@ -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…
Reference in New Issue