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
--output on this command (or remove its short form -o) so it falls through to the global --output persistent 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.
Problem
The
customer download-licensecommand registers a local--output(short:-o) flag that specifies a file path for writing the downloaded license:This shadows the global persistent
--outputflag (which controls output formatting:json|table|wide) introduced in #740.Impact
Running:
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/-ofile-path flag and introduce a new flag for file output:--path(or--output-file) as the new file-path destination flag.--outputon this command (or remove its short form-o) so it falls through to the global--outputpersistent flag for formatting.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.