git-credential-manager: depend on openjdk

master
Markus Reiter 2020-02-06 02:47:30 +01:00 committed by Alexander Bayandin
parent 05775a51e7
commit d20c6bc93e
1 changed files with 6 additions and 2 deletions

View File

@ -3,14 +3,18 @@ class GitCredentialManager < Formula
homepage "https://docs.microsoft.com/vsts/git/set-up-credential-managers"
url "https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux/releases/download/git-credential-manager-2.0.4/git-credential-manager-2.0.4.jar"
sha256 "fb8536aac9b00cdf6bdeb0dd152bb1306d88cd3fdb7a958ac9a144bf4017cad7"
revision 1
bottle :unneeded
depends_on :java => "1.6+"
depends_on "openjdk"
def install
libexec.install "git-credential-manager-#{version}.jar"
bin.write_jar_script libexec/"git-credential-manager-#{version}.jar", "git-credential-manager"
(bin/"git-credential-manager").write <<~EOS
#!/bin/bash
exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/git-credential-manager-#{version}.jar" "$@"
EOS
end
test do