Skip to content

nitro-cli terminate-enclave --all outputs malformed JSON object if it terminates multiple enclaves #483

@kwantam

Description

@kwantam

The output from nitro-cli terminate-enclave --all when multiple enclaves get killed is:

{
  "EnclaveName": "some_enclave",
  "EnclaveID": "i-EnclaveId1",
  "Terminated": true
}
{
  "EnclaveName": "other_enclave",
  "EnclaveID": "i-EnclaveId2",
  "Terminated": true
}

It would be handy if this were instead

[
    {
      "EnclaveName": "some_enclave",
      "EnclaveID": "i-EnclaveId1",
      "Terminated": true
    },
    {
      "EnclaveName": "other_enclave",
      "EnclaveID": "i-EnclaveId2",
      "Terminated": true
    }
]

(Relatedly, the output when no enclaves are killed is the empty string, whereas it would be handy for it to be the empty JSON array [].)

It would be great if the output were always a valid JSON array; this would help with automated processing of results, say, with jq.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions