Skip to content

Commit

Permalink
sonar-scanner Allow overriding JDK
Browse files Browse the repository at this point in the history
sonar-scanner Allow overrding sonar-scanner JDK if JAVA_HOME is set
  • Loading branch information
jonesbusy committed Oct 3, 2024
1 parent c67ba56 commit 435e4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Formula/s/sonar-scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SonarScanner < Formula
sha256 cellar: :any_skip_relocation, all: "64219f0b6138017bced084185550e6d402a43fa4c2f9e01d59c0b8629e461563"
end

depends_on "openjdk@17"
depends_on "openjdk"

def install
rm_r(Dir["bin/*.bat"])
Expand All @@ -20,7 +20,7 @@ def install
ln_s etc/"sonar-scanner.properties", libexec/"conf/sonar-scanner.properties"
bin.env_script_all_files libexec/"bin/",
SONAR_SCANNER_HOME: libexec,
JAVA_HOME: Formula["openjdk@17"].opt_prefix
JAVA_HOME: Language::Java.overridable_java_home_env[:JAVA_HOME]
end

test do
Expand Down

0 comments on commit 435e4cf

Please sign in to comment.