Skip to content
Snippets Groups Projects
Commit 960768d8 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

mac/java_requirement: avoid adding/removing stub.

parent ea28c790
No related branches found
No related tags found
No related merge requests found
......@@ -12,9 +12,10 @@ class JavaRequirement < Requirement
javas = []
javas << Pathname.new(ENV["JAVA_HOME"])/"bin/java" if ENV["JAVA_HOME"]
javas << java_home_cmd
javas << which("java")
javas.delete(Pathname.new("/usr/bin/java")) # /usr/bin/java is a stub on macOS
javas.compact
which_java = which("java")
# /usr/bin/java is a stub on macOS
javas << which_java if which_java.to_s != "/usr/bin/java"
javas
end
def java_home_cmd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment