Error message on command typo is extremely counter-intuitive
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
Hello,
If I type sops updateKeys some-file.yaml instead of sops updatekeys some-file.yaml, I get the following error message: error loading config: no matching creation rules found.
The problem here is not in the config loading: The configuration loaded okay, but rather, updateKeys was understood like a file-name.
Some ideas that I think could improve the user experience.
- Warn when the specified file does not end in
.yaml. - Check whether the file argument resembles to a valid subcommand.
- Change this error message to be much more explicit in that, parsing and validating the configuration file succeeded, but the specified path did not match any rules in the configuration file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the command typo and trace the CLI's command parsing, file-argument handling, and configuration-rule matching; the payload names no specific files or tests. Done means the typo or unmatched path produces a diagnostic that distinguishes command parsing from configuration loading, with behavior verified against the reported command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100