Skip to content

Commit

Permalink
fix: client cmd out of index error
Browse files Browse the repository at this point in the history
  • Loading branch information
rurreac committed Jul 29, 2024
1 parent f0d665a commit 916f44e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ func flagSanityCheck(clientFlags *flag.FlagSet) error {
if conf.FlagIsDefined(clientFlags, "template") {
flagExclusion = append(flagExclusion, "-template")
}
if len(clientFlags.Args()) > 1 {
flagExclusion = append(flagExclusion, clientFlags.Args()...)
argNumber := len(clientFlags.Args())
if argNumber != 1 {
return fmt.Errorf("%s client requires exactly one valid server address as an argument", clientType)
}
}
if len(flagExclusion) > 0 {
Expand Down

0 comments on commit 916f44e

Please sign in to comment.