fix(cli): Allow download of files with no payload content
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled

This commit is contained in:
Daniel López Guimaraes 2025-11-11 13:06:11 +00:00
parent f3c57f99ef
commit c17b68c45f
No known key found for this signature in database
GPG Key ID: 6AC74DE3DEF050E0

View File

@ -117,7 +117,7 @@ const downloadCmd = new Command('download')
const keys = ctx.get3DSKeys();
const decrypted = decrypt3DS(buffer, keys.aesKey);
// TODO - Handle multiple payloads
buffer = decrypted.payload_contents[0].content;
buffer = decrypted.payload_contents[0]?.content ?? Buffer.alloc(0);
}
await pipeline(Readable.from(buffer), process.stdout);