Skip to content

fix(certs): respect --json output in certs setup#4775

Open
manasa-bhagwat wants to merge 1 commit intosuperfly:masterfrom
manasa-bhagwat:fix/4724-certs-setup-json
Open

fix(certs): respect --json output in certs setup#4775
manasa-bhagwat wants to merge 1 commit intosuperfly:masterfrom
manasa-bhagwat:fix/4724-certs-setup-json

Conversation

@manasa-bhagwat
Copy link

Summary

Fixes fly certs setup ignoring --json output mode.

  • Add JSON output handling in runCertificatesSetup in internal/command/certificates/root.go
  • When --json is set, return API response via render.JSON(...) and skip human-readable DNS instructions
  • Preserve existing non-JSON behavior unchanged

Fixes #4724.

Why

fly certs setup --json should be machine-readable for automation/IaC workflows.
Before this change, the command always printed human-oriented setup text, which broke JSON-driven scripting.

Test plan

  • Build local binary:
    • go build -o .\bin\flyctl.exe .
  • Manual verify JSON mode:
    • .\bin\flyctl.exe certs setup <hostname> --json -a <app>
    • Confirm output is JSON (no DNS Setup Options human text)
  • Manual verify default mode:
    • .\bin\flyctl.exe certs setup <hostname> -a <app>
    • Confirm existing human-readable DNS setup output remains

Notes

Signed-off-by: manasa <manasa.bhagwat.work@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fly certs --json arg is ignored

1 participant