diff --git a/lib/core.js b/lib/core.js index 7472c95..9f9e5f1 100644 --- a/lib/core.js +++ b/lib/core.js @@ -107,7 +107,7 @@ function writeCertificateAsync(result, args, defaults, handlers) { // TODO XXX end // yes, it's an array. weird, right? , webrootPath: args.webrootPath && [args.webrootPath] || [] - , account: account.accountId + , account: args.account.accountId , server: args.server || args.acmeDiscoveryUrl , logsDir: args.logsDir }; @@ -209,7 +209,7 @@ function getCertificateAsync(account, args, defaults, handlers) { } }); }).then(function (results) { - writeCertificateAsync(results, args, defaults, handlers); + return writeCertificateAsync(results, args, defaults, handlers); }); }