hashicorp / hashicorp/nomad-pack
UI: When a command fails due to a missing argument, the error is unhelpful
- Dominant language
- Go
- Stars
- 447
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
When trying to use `nomad-pack generate pack`, I initially ran the command bare (mostly by accident).
I'd usually expect that either the command would interactively ask for what it wanted, or to fail with usage information that would guide me to the correct invocation.
However instead it failed with:
```shell
! Error Parsing Args Or Flags
Error: this command requires exactly 1 args(s), received 0
Type: *errors.errorString
```
This is somewhat a jarring error string for incorrect input (and feels more like what I'd expect if some other, less expected, failure occurred).
Contributor guide
Research direction
Start by reproducing the bare `nomad-pack generate pack` invocation described in the issue and trace the command's argument handling. Determine how missing arguments should provide useful usage guidance or an interactive prompt, then verify that the failure no longer reports only the low-level parser error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100