mirror of https://github.com/docker/docs.git
fix list cluster
This commit is contained in:
parent
80cc51c9be
commit
a64cf5821c
4
main.go
4
main.go
|
|
@ -70,6 +70,10 @@ func main() {
|
||||||
Usage: "list nodes in a cluster",
|
Usage: "list nodes in a cluster",
|
||||||
Flags: []cli.Flag{flToken},
|
Flags: []cli.Flag{flToken},
|
||||||
Action: func(c *cli.Context) {
|
Action: func(c *cli.Context) {
|
||||||
|
if c.String("token") == "" {
|
||||||
|
log.Fatal("--token required to list a cluster")
|
||||||
|
}
|
||||||
|
|
||||||
nodes, err := discovery.FetchSlaves(c.String("token"))
|
nodes, err := discovery.FetchSlaves(c.String("token"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue