diff --git a/Formula/detekt.rb b/Formula/detekt.rb index b95ac1876466..f09a84cc25f4 100644 --- a/Formula/detekt.rb +++ b/Formula/detekt.rb @@ -18,7 +18,8 @@ class Detekt < Formula def install libexec.install "detekt-cli-#{version}-all.jar" - bin.write_jar_script libexec/"detekt-cli-#{version}-all.jar", "detekt", java_version: "17" + # remove `--add-opens` after https://github.com/detekt/detekt/issues/5576 + bin.write_jar_script libexec/"detekt-cli-#{version}-all.jar", "detekt", "--add-opens java.base/java.lang=ALL-UNNAMED", java_version: "17" end test do