2019-07-07 11:18:12 +05:30
|
|
|
const fs = require('fs');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
const ROOT_PATH = path.resolve(__dirname, '../..');
|
|
|
|
|
2019-12-21 20:55:43 +05:30
|
|
|
// 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.ee?
|
|
|
|
const isFossOnly = JSON.parse(process.env.FOSS_ONLY || 'false');
|
2019-07-07 11:18:12 +05:30
|
|
|
module.exports =
|
2019-12-21 20:55:43 +05:30
|
|
|
fs.existsSync(path.join(ROOT_PATH, 'ee', 'app', 'models', 'license.rb')) && !isFossOnly;
|