From 98e8eaf3f06f47e6ec2f801b0cb68ddadf33c94d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 29 Oct 2019 13:55:46 -0600 Subject: [PATCH] v3.0.10: no auto-install, fix promisify --- greenlock.js | 2 -- package-lock.json | 2 +- package.json | 2 +- plugins.js | 9 +++++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/greenlock.js b/greenlock.js index 955c2a7..ee84fc7 100644 --- a/greenlock.js +++ b/greenlock.js @@ -14,8 +14,6 @@ var A = require('./accounts.js'); var C = require('./certificates.js'); var UserEvents = require('./user-events.js'); -var promisify = require('util').promisify; - var caches = {}; // { maintainerEmail, directoryUrl, subscriberEmail, store, challenges } diff --git a/package-lock.json b/package-lock.json index f00ff96..054c995 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@root/greenlock", - "version": "3.0.9", + "version": "3.0.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0b19334..5250bdd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@root/greenlock", - "version": "3.0.9", + "version": "3.0.10", "description": "The easiest Let's Encrypt client for Node.js and Browsers", "homepage": "https://rootprojects.org/greenlock/", "main": "greenlock.js", diff --git a/plugins.js b/plugins.js index 5ee6e89..09a5a00 100644 --- a/plugins.js +++ b/plugins.js @@ -4,6 +4,7 @@ var P = module.exports; var spawn = require('child_process').spawn; var spawnSync = require('child_process').spawnSync; +var promisify = require('util').promisify; // Exported for CLIs and such to override P.PKG_DIR = __dirname; @@ -27,9 +28,17 @@ P._loadHelper = function(modname) { try { return Promise.resolve(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; + + // Fun experiment, bad idea + /* return P._install(modname).then(function() { return require(modname); }); + */ } };