Skip to content

Commit

Permalink
cli/start: fix the printing out of the client-command line flags
Browse files Browse the repository at this point in the history
Before:

```
CockroachDB node starting...
client flags:        /usr/bin/cockroach <client cmd> --host=2607:a600:124:755c::16:26257
```

After:

```
CockroachDB node starting...
client flags:        /usr/bin/cockroach <client cmd> --host=[2607:a600:124:755c::16]:26257
```

Release note: None
  • Loading branch information
knz committed Jul 17, 2019
1 parent 608b4a9 commit 5c9ac90
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cli/start.go
Expand Up @@ -907,9 +907,8 @@ func hintServerCmdFlags(ctx context.Context, cmd *cobra.Command) {

func clientFlags() string {
flags := []string{os.Args[0], "<client cmd>"}
host, port, err := net.SplitHostPort(serverCfg.AdvertiseAddr)
if err == nil {
flags = append(flags, "--host="+host+":"+port)
if serverCfg.AdvertiseAddr != "" {
flags = append(flags, "--host="+serverCfg.AdvertiseAddr)
}
if startCtx.serverInsecure {
flags = append(flags, "--insecure")
Expand Down

0 comments on commit 5c9ac90

Please sign in to comment.