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

is_ee_env.js « helpers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 801cf6abc819f68e097f57067e67691b145ca7cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const fs = require('fs');
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 =
  fs.existsSync(path.join(ROOT_PATH, 'ee', 'app', 'models', 'license.rb')) &&
  (!process.env.IS_GITLAB_EE || JSON.parse(process.env.IS_GITLAB_EE));