Skip to content

Commit

Permalink
Fix wrong error message when positional arguments are provided (antre…
Browse files Browse the repository at this point in the history
…a-io#618)

The error message was opposite to the fact.
  • Loading branch information
tnqn committed Apr 16, 2020
1 parent 238a314 commit b126b52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/antrea-agent/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (o *Options) complete(args []string) error {
// validate validates all the required options. It must be called after complete.
func (o *Options) validate(args []string) error {
if len(args) != 0 {
return fmt.Errorf("an empty argument list is not supported")
return fmt.Errorf("no positional arguments are supported")
}
// Validate service CIDR configuration
_, _, err := net.ParseCIDR(o.config.ServiceCIDR)
Expand Down
2 changes: 1 addition & 1 deletion cmd/antrea-controller/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (o *Options) complete(args []string) error {
// validate validates all the required options.
func (o *Options) validate(args []string) error {
if len(args) != 0 {
return errors.New("No arguments are supported")
return errors.New("no positional arguments are supported")
}
return nil
}
Expand Down

0 comments on commit b126b52

Please sign in to comment.