13
0
Fork 0
mirror of https://github.com/hashicorp/vault-action.git synced 2026-07-02 07:29:32 +00:00

Handle undefined ca_chain with optional chaining

Fixes #609
This commit is contained in:
Max Fröhlich 2026-06-02 14:29:17 +02:00 committed by GitHub
parent 892a26828f
commit 32ed431167
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ const outputMap = {
cert: { key: 'certificate', tx: (v) => v },
key: { key: 'private_key', tx: (v) => v },
ca: { key: 'issuing_ca', tx: (v) => v },
ca_chain: { key: 'ca_chain', tx: (v) => v.join('\n') },
ca_chain: { key: 'ca_chain', tx: (v) => v?.join('\n') ?? '' },
};
/**
@ -78,4 +78,4 @@ async function getCertificates(pkiRequests, client) {
module.exports = {
getCertificates,
};
};