sbt@0.13: require Java 8 specifically (#28777)

This commit is contained in:
Andrew Janke 2018-06-08 02:03:12 -04:00 committed by ilovezfs
parent fb42cc6566
commit baa9dd553e

View file

@ -3,12 +3,13 @@ class SbtAT013 < Formula
homepage "https://www.scala-sbt.org/"
url "https://github.com/sbt/sbt/releases/download/v0.13.17/sbt-0.13.17.tgz"
sha256 "25f782ccb2ad6d54e13ce6cec0afa3d2328874c508d68ee34e2f742e99f2c847"
revision 1
bottle :unneeded
keg_only :versioned_formula
depends_on :java => "1.6+"
depends_on :java => "1.8"
def install
inreplace "bin/sbt" do |s|
@ -21,6 +22,7 @@ class SbtAT013 < Formula
(bin/"sbt").write <<~EOS
#!/bin/sh
export JAVA_HOME=$(#{Language::Java.java_home_cmd("1.8")})
if [ -f "$HOME/.sbtconfig" ]; then
echo "Use of ~/.sbtconfig is deprecated, please migrate global settings to #{etc}/sbtopts" >&2
. "$HOME/.sbtconfig"