diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-15 12:06:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-15 12:06:09 +0300 |
commit | 3d13802bc2c9400ea33defdd43bff6d904ee9c4d (patch) | |
tree | 44f66ca61ea85130cf210d013b737642ce9c7794 /config/helpers/is_ee_env.js | |
parent | 00050519d16f7c0296fa0113de7065a607862501 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/helpers/is_ee_env.js')
-rw-r--r-- | config/helpers/is_ee_env.js | 11 |
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)); |