Skip to content

Commit

Permalink
help command does not expect args
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Koch committed Jan 27, 2023
1 parent 1d7deae commit 94102e0
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions command/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package command

import (
"context"
"fmt"

"github.com/avenga/couper/config"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -40,15 +39,7 @@ func NewHelp(ctx context.Context) *Help {

func (h Help) Execute(args Args, _ *config.Couper, _ *logrus.Entry) error {
defer Synopsis()
if len(args) == 0 {
h.Usage()
return fmt.Errorf("missing command argument")
}
cmd := NewCommand(h.ctx, args[0])
if cmd == nil {
return fmt.Errorf("unknown command: %s", args[0])
}
cmd.Usage()
h.Usage()
return nil
}

Expand Down

0 comments on commit 94102e0

Please sign in to comment.