hashicorp / hashicorp/nomad-pack

UI: When a command fails due to a missing argument, the error is unhelpful

Open
#295 1 comment 0 reactions 0 assignees View on GitHub
hcc/jira stage/accepted theme/cli type/bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.