X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-cli.git;a=blobdiff_plain;f=main.go;h=090144d9bab0e96ae23c0ad9ca758dae73930eb1;hp=eec23da46f5205ffc99b280d04d348f737f151c3;hb=e7c3ce2030313576cdf15e0eff26e59fcbeb4acc;hpb=18893f9ed5f003133fad06b42a381effe4017bab diff --git a/main.go b/main.go index eec23da..090144d 100644 --- a/main.go +++ b/main.go @@ -169,7 +169,10 @@ func main() { app.Before = func(ctx *cli.Context) error { var err error - // Don't init anything when user wants help + // Don't init anything when no argument or help option is set + if ctx.NArg() == 0 { + return nil + } for _, a := range ctx.Args() { switch a { case "-h", "--h", "-help", "--help": @@ -254,6 +257,7 @@ func XdsConnInit(ctx *cli.Context) error { return cli.NewExitError(errmsg, 1) } HTTPCli.SetLogLevel(ctx.String("loglevel")) + Log.Infoln("HTTP session ID : ", HTTPCli.GetClientID()) // Create io Websocket client Log.Debugln("Connecting IO.socket client on ", baseURL)