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]);