Skip to content

Comments

fix: --json should not show human steps#4250

Open
matthiaz wants to merge 1 commit intosuperfly:masterfrom
matthiaz:mr/matthias/fix-dont-print-human-steps-when-json-requested
Open

fix: --json should not show human steps#4250
matthiaz wants to merge 1 commit intosuperfly:masterfrom
matthiaz:mr/matthias/fix-dont-print-human-steps-when-json-requested

Conversation

@matthiaz
Copy link

As a human, yes I want human readable steps.
But If I'm asking for --json, I really don't expect those steps to break my json.

Current behaviour

flyctl certs show yourdomain.be --app $NAME --json                            
{
    "ID": "cert_1235ln",
    "AcmeDNSConfigured": false,
    "AcmeALPNConfigured": false,
    "Configured": false,
    "CertificateAuthority": "lets_encrypt",
    "CreatedAt": "2025-03-14T11:11:23Z",
    "DNSProvider": "cloudflare",
...
    "Hostname": "yourdomain.be",
    "Source": "fly",
    "ClientStatus": "Awaiting configuration",
    "IsApex": false,
    "IsWildcard": false,
    "Issued": {
        "Nodes": []
    }
}

You are creating a certificate for yourdomain.be
We are using Let's Encrypt for this certificate.

You can configure your DNS for yourdomain.be by:

1: Adding an CNAME record to your DNS service which reads:

    CNAME test. yourdomain-test.fly.dev

Notice the human readable 'next steps' that should not be there when using --json

after this change

flyctl certs show yourdomain.be --app $NAME --json                            
{
    "ID": "cert_1235ln",
    "AcmeDNSConfigured": false,
    "AcmeALPNConfigured": false,
    "Configured": false,
    "CertificateAuthority": "lets_encrypt",
    "CreatedAt": "2025-03-14T11:11:23Z",
    "DNSProvider": "cloudflare",
...
    "Hostname": "yourdomain.be",
    "Source": "fly",
    "ClientStatus": "Awaiting configuration",
    "IsApex": false,
    "IsWildcard": false,
    "Issued": {
        "Nodes": []
    }
}

…rted in human readable text. Makes parsing a command json output difficult.
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.

1 participant