commit
820be31808
|
@ -219,6 +219,7 @@ The following methods may be called to generate standard warning messages:
|
|||
| --------------------------------- | ----------- |
|
||||
| `path_environment_variable(path)` | users should make sure `path` is in their `$PATH` environment variable
|
||||
| `zsh_path_helper(path)` | zsh users must take additional steps to make sure `path` is in their `$PATH` environment variable
|
||||
| `depends_on_java(version)` | users should make sure they have the specified version of java installed (`version` should be one of `6`, `7`, or empty for `8`)
|
||||
| `logout` | users should log out and log back in to complete installation
|
||||
| `reboot` | users should reboot to complete installation
|
||||
| `files_in_usr_local` | the Cask installs files to `/usr/local`, which may confuse Homebrew
|
||||
|
|
|
@ -77,6 +77,24 @@ class Hbc::CaveatsDSL
|
|||
end
|
||||
end
|
||||
|
||||
def depends_on_java(java_version = 'latest')
|
||||
if java_version == 'latest'
|
||||
puts <<-EOS.undent
|
||||
#{@cask} requires Java. You can install the latest version with
|
||||
|
||||
brew cask install java
|
||||
|
||||
EOS
|
||||
else
|
||||
puts <<-EOS.undent
|
||||
#{@cask} requires Java #{java_version}. You can install it with
|
||||
|
||||
brew cask install caskroom/versions/java#{java_version}
|
||||
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
def logout
|
||||
puts <<-EOS.undent
|
||||
You must log out and log back in for the installation of #{@cask}
|
||||
|
|
Loading…
Reference in New Issue