Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/helpers/is_ee_env.js')
-rw-r--r--config/helpers/is_ee_env.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/config/helpers/is_ee_env.js b/config/helpers/is_ee_env.js
index 3fe9bb891eb..801cf6abc81 100644
--- a/config/helpers/is_ee_env.js
+++ b/config/helpers/is_ee_env.js
@@ -3,7 +3,12 @@ const path = require('path');
const ROOT_PATH = path.resolve(__dirname, '../..');
+// The `IS_GITLAB_EE` is always `string` or `nil`
+// Thus the nil or empty string will result
+// in using default value: true
+//
+// The behavior needs to be synchronised with
+// lib/gitlab.rb: Gitlab.ee?
module.exports =
- process.env.IS_GITLAB_EE !== undefined
- ? JSON.parse(process.env.IS_GITLAB_EE)
- : fs.existsSync(path.join(ROOT_PATH, 'ee'));
+ fs.existsSync(path.join(ROOT_PATH, 'ee', 'app', 'models', 'license.rb')) &&
+ (!process.env.IS_GITLAB_EE || JSON.parse(process.env.IS_GITLAB_EE));