diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-03-28 20:02:56 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-03-28 20:14:16 +0300 |
commit | baa671a3895acde31ea4433023e90ca72a7ae933 (patch) | |
tree | 3ee72718ee29e3363681a46b7c1c02346d84083e /config/helpers | |
parent | a85fd76f524802a02957ccdcca7674f618a9e069 (diff) |
Extract IS_EE config helper
Diffstat (limited to 'config/helpers')
-rw-r--r-- | config/helpers/is_ee_env.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/helpers/is_ee_env.js b/config/helpers/is_ee_env.js new file mode 100644 index 00000000000..1fdbca591c0 --- /dev/null +++ b/config/helpers/is_ee_env.js @@ -0,0 +1,9 @@ +const fs = require('fs'); +const path = require('path'); + +const ROOT_PATH = path.resolve(__dirname, '../..'); + +module.exports = + process.env.EE !== undefined + ? JSON.parse(process.env.EE) + : fs.existsSync(path.join(ROOT_PATH, 'ee')); |