mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
check for version of node that the SFEplugin requires too
This commit is contained in:
parent
b7d0c53d7c
commit
ab88c1aa36
@ -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]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user