Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couper help error #678

Merged
merged 4 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Unreleased changes are available as `avenga/couper:edge` container.
* **Fixed**
* Use of [backend-related variables](https://docs.couper.io/configuration/variables#backend) in [`custom_log_fields`](https://docs.couper.io/observation/logging#custom-logging) within a [`backend` block](https://docs.couper.io/configuration/block/backend) ([#658](https://github.com/avenga/couper/pull/658))
* Loop with evaluation error in [`custom_log_fields`](https://docs.couper.io/observation/logging#custom-logging) if log level is `"debug"` ([#659](https://github.com/avenga/couper/pull/659))
* Removed error message with `couper help` [command](https://docs.couper.io/configuration/command-line) ([#678](https://github.com/avenga/couper/pull/678))

---

Expand Down
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