Compare commits

..

2 Commits

Author SHA1 Message Date
AJ ONeal fcafde98be v3.1.4: bugfix basePath for issue #13 2019-11-05 15:38:17 -07:00
AJ ONeal 9ea7961bb6 v3.1.4: bugfix basePath for issue #13 2019-11-05 15:38:08 -07:00
4 changed files with 13 additions and 10 deletions

View File

@ -405,7 +405,8 @@ G.create = function(gconf) {
showDir = true;
dirUrl = greenlock._defaults.directoryUrl;
}
if (showDir || /staging/.test(dirUrl)) {
if (showDir || (/staging/.test(dirUrl) && !gdefaults.shownDirectory)) {
gdefaults.shownDirectory = true;
console.info('ACME Directory URL:', gdefaults.directoryUrl);
}
@ -446,13 +447,15 @@ G.create = function(gconf) {
var storeConf = siteConf.store || mconf.store;
storeConf = JSON.parse(JSON.stringify(storeConf));
storeConf.packageRoot = gconf.packageRoot;
if (storeConf.basePath) {
var path = require('path');
storeConf.basePath = path.resolve(
gconf.packageRoot || process.cwd(),
'greenlock'
);
var path = require('path');
if (!storeConf.basePath) {
storeConf.basePath = 'greenlock';
}
storeConf.basePath = path.resolve(
gconf.packageRoot || process.cwd(),
storeConf.basePath
);
return P._loadStore(storeConf).then(function(store) {
return A._getOrCreate(
greenlock,

View File

@ -162,7 +162,7 @@ module.exports._read = function(pkgdir) {
throw err;
}
try {
require(path.join(pkgdir, 'package.json'));
require(path.resolve(path.join(pkgdir, './package.json')));
} catch (e) {
e.context = 'package.json';
e.desc =

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@root/greenlock",
"version": "3.1.3",
"version": "3.1.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@root/greenlock",
"version": "3.1.3",
"version": "3.1.4",
"description": "The easiest Let's Encrypt client for Node.js and Browsers",
"homepage": "https://rootprojects.org/greenlock/",
"main": "greenlock.js",