Specifying an invalid value for `columns` results in a stack trace
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
**What steps did you take:**
```
kapp ls -A --column id
```
**What happened:**
```
...
panic: Failed to find header: id
goroutine 1 [running]:
github.com/cppforlife/go-cli-ui/ui.(*ConfUI).PrintTable(0x140000f2700, {{0x10329afa1, 0x16}, {0x103287e7c, 0x4}, {0x140001e6000, 0x6, 0x6}, {0x14000709ae0, 0x2, ...}, ...})
github.com/cppforlife/go-cli-ui@v0.0.0-20200716203538-1e47f820817f/ui/conf_ui.go:85 +0x88
github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd/app.(*ListOptions).Run(0x140000e3200)
github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd/app/list.go:156 +0x740
github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd/app.NewListCmd.func1(0x42bd590?, {0x140007a0540?, 0x14000859260?, 0x14000811a80?})
github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd/app/list.go:37 +0x20
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x140000f6cf0?, {0x140007a0540, 0x0, 0x3})
github.com/cppforlife/cobrautil@v0.0.0-20220907150944-da5ee3a6ab1f/misc.go:45 +0x68
github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd.NewKappCmd.func1.1(0x140001a3c48?, {0x140007a0540, 0x0, 0x3})
github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd/kapp.go:128 +0xa8
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x140000a9c00?, {0x140007a0540, 0x0, 0x3})
github.com/cppforlife/cobrautil@v0.0.0-20220907150944-da5ee3a6ab1f/misc.go:45 +0x68
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x140000a9c00?, {0x140007a0540, 0x0, 0x3})
github.com/cppforlife/cobrautil@v0.0.0-20220907150944-da5ee3a6ab1f/misc.go:45 +0x68
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x1400042b400?, {0x140007a0540, 0x0, 0x3})
github.com/cppforlife/cobrautil@v0.0.0-20220907150944-da5ee3a6ab1f/misc.go:45 +0x68
github.com/spf13/cobra.(*Command).execute(0x1400042b400, {0x140007a0510, 0x3, 0x3})
github.com/spf13/cobra@v1.4.0/command.go:856 +0x4c4
github.com/spf13/cobra.(*Command).ExecuteC(0x1400042af00)
github.com/spf13/cobra@v1.4.0/command.go:974 +0x354
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.4.0/command.go:902
main.nonExitingMain()
github.com/vmware-tanzu/carvel-kapp/cmd/kapp/kapp.go:43 +0x110
main.main()
github.com/vmware-tanzu/carvel-kapp/cmd/kapp/kapp.go:22 +0x1c
```
**What did you expect:**
An error message indicating that "`id`" is not a valid column. Ideally, would list the acceptable/valid values.
**Anything else you would like to add:**
**Environment:**
- kapp version (use `kapp --version`): 0.54.3
- OS (e.g. from `/etc/os-release`): (all)
- Kubernetes version (use `kubectl version`): n/a
---
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
Contributor guide
Assessment
This issue has not been assessed yet.