From a7b3560714b4d9cc4ab32dffcd1f74a284b93580 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Feb 2022 09:45:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-8-stable-ee --- lib/gitlab_edition.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/gitlab_edition.rb') diff --git a/lib/gitlab_edition.rb b/lib/gitlab_edition.rb index 6eb6b52c357..02006148a34 100644 --- a/lib/gitlab_edition.rb +++ b/lib/gitlab_edition.rb @@ -18,7 +18,11 @@ module GitlabEdition end def self.ee? - @is_ee ||= + # To reduce dependencies in QA image we are not using + # `Gitlab::Utils::StrongMemoize` but reimplementing its functionality. + return @is_ee if defined?(@is_ee) + + @is_ee = # We use this method when the Rails environment is not loaded. This # means that checking the presence of the License class could result in # this method returning `false`, even for an EE installation. @@ -34,7 +38,9 @@ module GitlabEdition end def self.jh? - @is_jh ||= + return @is_jh if defined?(@is_jh) + + @is_jh = ee? && root.join('jh').exist? && !%w[true 1].include?(ENV['EE_ONLY'].to_s) -- cgit v1.2.3