init before renew

This commit is contained in:
AJ ONeal 2019-10-31 06:20:49 -06:00
rodzic 72ccd8f3b7
commit fa8d1d76b3
2 zmienionych plików z 14 dodań i 4 usunięć

Wyświetl plik

@ -261,8 +261,10 @@ G.create = function(gconf) {
// needs to get info about the renewal, such as which store and challenge(s) to use
greenlock.renew = function(args) {
return manager.defaults().then(function(mconf) {
return greenlock._renew(mconf, args);
return greenlock._init().then(function() {
return manager.defaults().then(function(mconf) {
return greenlock._renew(mconf, args);
});
});
};
greenlock._renew = function(mconf, args) {

Wyświetl plik

@ -187,14 +187,22 @@ P._normalizeChallenge = function(name, ch) {
};
P._loadSync = function(modname) {
var mod;
try {
return require(modname);
} catch (e) {
console.error("Could not load '%s'", modname);
console.error('Did you install it?');
console.error('\tnpm install --save %s', modname);
throw e;
}
/*
try {
mod = require(modname);
} catch (e) {
P._installSync(modname);
mod = require(modname);
}
return mod;
*/
};
P._installSync = function(moduleName) {