cli: customer download-license --output flag shadows global --output format flag
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start at the customer download-license command registration and inspect its local --output/-o flag alongside the global persistent --output formatting flag. Verify the reported command behavior, then make file output use the new destination flag while preserving global format handling and confirm the command no longer writes to a file named json.
Written by the indexing model from the issue text.
Description
Problem
The customer download-license command registers a local --output (short: -o) flag that specifies a file path for writing the downloaded license:
cmd.Flags().StringVarP(&output, "output", "o", "-", "Path to output license to. Defaults to stdout")
This shadows the global persistent --output flag (which controls output formatting: json|table|wide) introduced in #740.
Impact
Running:
replicated customer download-license --customer cus_xxx --output json
does not format the license as JSON. Instead, it writes the license YAML to a file literally named json.
This is confusing and inconsistent with every other command in the CLI.
Suggested Fix (non-breaking)
Deprecate the current --output / -o file-path flag and introduce a new flag for file output:
- Add
--path(or--output-file) as the new file-path destination flag. - Deprecate
--outputon this command (or remove its short form-o) so it falls through to the global--outputpersistent flag for formatting. - Consider whether JSON output is actually useful for a raw license YAML download.
Context
This was explicitly called out in review of #740 by @xavpaice and deferred to a follow-up PR to avoid making a breaking change in the global output flag refactoring.
- Dominant language
- Go
- Stars
- 36
- Forks
- 25
- Avg merge
- 9h 27m
- Merged PRs (30d)
- 3
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.
More from replicatedhq/replicated
-
agent-working
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
replicatedhq/replicated#535 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
replicatedhq/replicated#22 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
replicatedhq/replicated#577 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
replicatedhq/replicated#389 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
replicatedhq/replicated#370 · 1 comment ·
All issues in replicatedhq/replicated
Similar issues
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100