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