From 879657ebce6e43ebc45d926f54eef58af97280b0 Mon Sep 17 00:00:00 2001
From: JeremyWuuuuu <jeremyw@jihulab.com>
Date: Fri, 23 Jul 2021 13:45:09 +0800
Subject: [PATCH] Fix: enhance is_jh judgment condition

- Add condition for `EE_ONLY` to make the judgment aligned with gitlab.rb
---
 config/helpers/is_jh_env.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/config/helpers/is_jh_env.js b/config/helpers/is_jh_env.js
index 5afeee2f498a8..10251d3166ea1 100644
--- a/config/helpers/is_jh_env.js
+++ b/config/helpers/is_jh_env.js
@@ -12,4 +12,5 @@ const ROOT_PATH = path.resolve(__dirname, '../..');
 // 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');
-module.exports = IS_EE && fs.existsSync(path.join(ROOT_PATH, 'jh'));
+const isEEOnly = JSON.parse(process.env.EE_ONLY || 'false');
+module.exports = IS_EE && !isEEOnly && fs.existsSync(path.join(ROOT_PATH, 'jh'));
-- 
GitLab