fix: skip (instead of fail) when pems.bundle is unavailable
This commit is contained in:
parent
c834d1603d
commit
16637c4f67
10
index.js
10
index.js
|
@ -280,13 +280,17 @@ module.exports.create = function (configs) {
|
|||
var bundleArchive = path.join(archiveDir, 'bundle' + checkpoints + '.pem');
|
||||
|
||||
return mkdirpAsync(archiveDir).then(function () {
|
||||
return PromiseA.all([
|
||||
var ps = [
|
||||
sfs.writeFileAsync(certArchive, pems.cert, 'ascii')
|
||||
, sfs.writeFileAsync(chainArchive, pems.chain, 'ascii')
|
||||
, sfs.writeFileAsync(fullchainArchive, [ pems.cert, pems.chain ].join('\n'), 'ascii')
|
||||
, sfs.writeFileAsync(privkeyArchive, pems.privkey, 'ascii')
|
||||
, sfs.writeFileAsync(bundleArchive, pems.bundle, 'ascii')
|
||||
]);
|
||||
];
|
||||
if (pems.bundle) {
|
||||
var bundleP = sfs.writeFileAsync(bundleArchive, pems.bundle, 'ascii');
|
||||
ps.push(bundleP);
|
||||
}
|
||||
return PromiseA.all(ps);
|
||||
}).then(function () {
|
||||
return mkdirpAsync(liveDir);
|
||||
}).then(function () {
|
||||
|
|
Loading…
Reference in New Issue