Logo
Explore Help
Sign In
mirrors/brew
1
0
Fork 0
You've already forked brew
mirror of https://github.com/Homebrew/brew.git synced 2025-07-14 16:09:03 +08:00
Code Issues Packages Projects Releases Wiki Activity
brew/Library/Homebrew/extend/os/linux/dependency_collector.rb

17 lines
327 B
Ruby
Raw Normal View History

Add frozen_string_literal to all files.
2019-04-19 15:38:03 +09:00
# frozen_string_literal: true
DependencyCollector: Add java_dep_if_needed [Linux] Use the openjdk formula if it's installed. Use the host's Java if it's sufficient. Otherwise install the openjdk formula.
2018-11-11 10:15:48 -08:00
class DependencyCollector
def java_dep_if_needed(tags)
req = JavaRequirement.new(tags)
begin
java_dep_if_needed: Install adoptopenjdk for Linux Install adoptopenjdk rather than openjdk for Linux. openjdk is superseded by adoptopenjdk.
2019-07-08 09:43:12 -07:00
dep = Dependency.new("adoptopenjdk", tags)
DependencyCollector: Add java_dep_if_needed [Linux] Use the openjdk formula if it's installed. Use the host's Java if it's sufficient. Otherwise install the openjdk formula.
2018-11-11 10:15:48 -08:00
return dep if dep.installed?
return req if req.satisfied?
rubocop: enable Layout/EmptyLineAfterGuardClause.
2019-02-19 13:12:52 +00:00
DependencyCollector: Add java_dep_if_needed [Linux] Use the openjdk formula if it's installed. Use the host's Java if it's sufficient. Otherwise install the openjdk formula.
2018-11-11 10:15:48 -08:00
dep
rescue FormulaUnavailableError
req
end
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 64ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API