Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cask: fixes for caveats output #6472

Merged
merged 3 commits into from Sep 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cask.rb
Expand Up @@ -147,7 +147,7 @@ def to_h
"version" => version,
"sha256" => sha256,
"artifacts" => artifacts.map(&method(:to_h_gsubs)),
"caveats" => to_h_string_gsubs(caveats),
"caveats" => (to_h_string_gsubs(caveats) unless caveats.empty?),
"depends_on" => depends_on,
"conflicts_with" => conflicts_with,
"container" => container,
Expand Down
7 changes: 3 additions & 4 deletions Library/Homebrew/cask/dsl/caveats.rb
Expand Up @@ -87,17 +87,17 @@ def eval_caveats(&block)
if java_version == :any
<<~EOS
#{@cask} requires Java. You can install the latest version with:
brew cask install java
brew cask install adoptopenjdk
EOS
elsif java_version.include?("11") || java_version.include?("+")
<<~EOS
#{@cask} requires Java #{java_version}. You can install the latest version with:
brew cask install java
brew cask install adoptopenjdk
EOS
else
<<~EOS
#{@cask} requires Java #{java_version}. You can install it with:
brew cask install homebrew/cask-versions/java#{java_version}
brew cask install homebrew/cask-versions/adoptopenjdk#{java_version}
EOS
end
end
Expand All @@ -118,7 +118,6 @@ def eval_caveats(&block)
<<~EOS
#{@cask} has been officially discontinued upstream.
It may stop working correctly (or at all) in recent versions of macOS.

EOS
end

Expand Down