1
0
mirror of https://github.com/docker/docs.git synced 2026-10-31 10:34:26 +03:00

Merge pull request #683 from icecrime/fail_fast_on_create

Fast exit from create on invalid command-line
This commit is contained in:
Victor Vieux
2015-04-28 10:52:20 -07:00

View File

@@ -60,12 +60,12 @@ func Run() {
ShortName: "c",
Usage: "create a cluster",
Action: func(c *cli.Context) {
discovery := &token.Discovery{}
discovery.Initialize("", 0)
token, err := discovery.CreateCluster()
if len(c.Args()) != 0 {
log.Fatalf("the `create` command takes no arguments. See '%s create --help'.", c.App.Name)
}
discovery := &token.Discovery{}
discovery.Initialize("", 0)
token, err := discovery.CreateCluster()
if err != nil {
log.Fatal(err)
}