Update java-jdk-javadoc: uninstall_postflight (#40616)

* Update java-jdk-javadoc: uninstall_postflight

* remove uninstall caveat
This commit is contained in:
commitay 2017-11-28 08:54:06 +10:00 committed by GitHub
parent b43ac10dca
commit 20e3c3a952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -19,6 +19,7 @@ cask 'java-jdk-javadoc' do
uninstall_postflight do uninstall_postflight do
`/usr/libexec/java_home -v #{version.before_comma} -X | grep -B0 -A1 JVMHomePath | sed -n -e 's/[[:space:]]*<string>\\(.*\\)<\\/string>/\\1/p'`.split("\n").each do |path| `/usr/libexec/java_home -v #{version.before_comma} -X | grep -B0 -A1 JVMHomePath | sed -n -e 's/[[:space:]]*<string>\\(.*\\)<\\/string>/\\1/p'`.split("\n").each do |path|
next unless File.exist?("#{path}/docs")
system_command '/bin/rm', system_command '/bin/rm',
args: ['-rf', "#{path}/docs"], args: ['-rf', "#{path}/docs"],
sudo: true sudo: true
@ -30,7 +31,5 @@ cask 'java-jdk-javadoc' do
License Agreement for Java SE at License Agreement for Java SE at
https://www.oracle.com/technetwork/java/javase/terms/license/index.html https://www.oracle.com/technetwork/java/javase/terms/license/index.html
#{token} will be uninstalled when the Java Cask is uninstalled or reinstalled
EOS EOS
end end