Skip to content

Commit

Permalink
buildkitd: fix handling multiple addr flags
Browse files Browse the repository at this point in the history
The issue in the cli package that added extra
field has been fixed now.

Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Feb 17, 2022
1 parent c14bf69 commit 1a19c6e
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 1a19c6e

Please sign in to comment.