Skip to content

Commit

Permalink
Merge pull request #2649 from tonistiigi/addr-fix
Browse files Browse the repository at this point in the history
buildkitd: fix handling multiple addr flags
  • Loading branch information
AkihiroSuda authored Feb 17, 2022
2 parents c14bf69 + 1a19c6e commit 22cf9cb
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions cmd/buildkitd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,15 +441,7 @@ func applyMainFlags(c *cli.Context, cfg *config.Config) error {
}

if c.IsSet("addr") || len(cfg.GRPC.Address) == 0 {
addrs := c.StringSlice("addr")
if len(addrs) > 1 {
addrs = addrs[1:] // https://github.com/urfave/cli/issues/160
}

cfg.GRPC.Address = make([]string, 0, len(addrs))
for _, v := range addrs {
cfg.GRPC.Address = append(cfg.GRPC.Address, v)
}
cfg.GRPC.Address = c.StringSlice("addr")
}

if c.IsSet("allow-insecure-entitlement") {
Expand Down

0 comments on commit 22cf9cb

Please sign in to comment.