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

is_jh_env.js « helpers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10251d3166ea1a81459c86376855880107984823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const fs = require('fs');
const path = require('path');
const IS_EE = require('./is_ee_env');

const ROOT_PATH = path.resolve(__dirname, '../..');

// The `FOSS_ONLY` is always `string` or `nil`
// Thus the nil or empty string will result
// in using default value: false
//
// The behavior needs to be synchronised with
// lib/gitlab.rb: Gitlab.jh?
// Since IS_EE already satisifies the conditions of not being a FOSS_ONLY.
// const isFossOnly = JSON.parse(process.env.FOSS_ONLY || 'false');
const isEEOnly = JSON.parse(process.env.EE_ONLY || 'false');
module.exports = IS_EE && !isEEOnly && fs.existsSync(path.join(ROOT_PATH, 'jh'));