diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-14 18:13:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-14 18:13:32 +0300 |
commit | 1123408ec8922d4a6908ef4b85aa0ff4fbea08fe (patch) | |
tree | dfd95769ede53024da1b348176b589ba1fc4c801 /lib/gitlab_edition.rb | |
parent | 2896c7471aa75a7842fe6318a122f83ca6c211bb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab_edition.rb')
-rw-r--r-- | lib/gitlab_edition.rb | 10 |
1 files changed, 8 insertions, 2 deletions
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) |