From ab88c1aa361fd7f9728fa0f57f87bd0e3de787f9 Mon Sep 17 00:00:00 2001 From: Daniel Schep Date: Fri, 3 May 2019 11:10:49 -0400 Subject: [PATCH] check for version of node that the SFEplugin requires too --- lib/classes/PluginManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js index 75c3f628d..b6ab298f9 100644 --- a/lib/classes/PluginManager.js +++ b/lib/classes/PluginManager.js @@ -157,11 +157,11 @@ class PluginManager { loadEnterprisePlugin() { const qualifiedEnterpriseModulePath = path.join( __dirname, '../../node_modules/@serverless/enterprise-plugin'); + // eslint-disable-next-line global-require const sfeNodeReq = require(`${qualifiedEnterpriseModulePath}/package.json`).engines.node; - if (process.env.SERVERLESS_DISABLE_ENTERPRISE && - process.env.SERVERLESS_DISABLE_ENTERPRISE.toLowerCase() === 'true' || - !semver.satisfies(process.version, sfeNodeReq) - ) { + if ((process.env.SERVERLESS_DISABLE_ENTERPRISE && + process.env.SERVERLESS_DISABLE_ENTERPRISE.toLowerCase() === 'true') || + !semver.satisfies(process.version, sfeNodeReq)) { return; } this.loadPlugins([qualifiedEnterpriseModulePath]);