`--output-type` must appear before `-d`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
On sops 3.7.3:
Expected
Given an encrypted .env file,
% sops -d secrets.enc.env --output-type json
<command prints secrets in the env file, but in a JSON object container instead>
Actual
% sops -d secrets.enc.env --output-type json
<command behaves as though `--output-type` was not given
Workaround
Moving --output-type json in front of -d <path> does work:
% sops --output-type json -d secrets.enc.env
<expected output as described above>
Not sure if this is expected behavior and thus a docs gap, or a bug. I'd guess the latter since sops --help says that everything is just a "global option" with no relative order required for them to work.
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-order difference using an encrypted .env file, comparing sops -d secrets.enc.env --output-type json with sops --output-type json -d secrets.enc.env; also inspect the behavior described by sops --help for global options. Done means the documented global options work regardless of their position, or the ordering requirement is clearly documented.
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
- 45/100