aws-nitro-enclaves-cli
aws-nitro-enclaves-cli copied to clipboard
`nitro-cli terminate-enclave --all` outputs malformed JSON object if it terminates multiple enclaves
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.
Looking at a fix in #486, but I'm considering making the output an array for nitro-cli terminate-enclave --enclave-id ... and nitro-cli terminate-enclave --enclave-name ... to make the output consistent.
However, this is an output change, so it will require a minor version bump at least, to make sure it doesn't break workflows.
Agreed on both points; always returning an array seems great, modulo backwards incompatibility.