aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-11-29 00:11:00 +0100
committerGitHub2017-11-29 00:11:00 +0100
commit2b7ecb47934018b95b681ee5a49f86286242c838 (patch)
tree8ca9e7212260563ca86843759df48e3d1b3d0713 /Library
parentc8ef8ceadcaaa4c933b58c00c12bac53cd1b27f8 (diff)
parentf355897afab50b548529a326effb361e63eada0a (diff)
downloadbrew-2b7ecb47934018b95b681ee5a49f86286242c838.tar.bz2
Merge pull request #3497 from reitermarkus/caveats
Only show `kext` caveat on High Sierra or above.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb1
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/caveats.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb
index 15e4f9c31..94e906a73 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb
@@ -31,7 +31,6 @@ module Hbc
directives[:signal] = [*directives[:signal]].flatten.each_slice(2).to_a
@directives = directives
- return if MacOS.version < :high_sierra
return unless directives.key?(:kext)
cask.caveats do
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/caveats.rb b/Library/Homebrew/cask/lib/hbc/dsl/caveats.rb
index 77e03bd1c..a6cbdd6bf 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/caveats.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/caveats.rb
@@ -17,7 +17,8 @@ module Hbc
def self.caveat(name, &block)
define_method(name) do |*args|
key = [name, *args]
- @built_in_caveats[key] = instance_exec(*args, &block)
+ text = instance_exec(*args, &block)
+ @built_in_caveats[key] = text if text
:built_in_caveat
end
end
@@ -42,6 +43,7 @@ module Hbc
end
caveat :kext do
+ next if MacOS.version < :high_sierra
<<~EOS
To install and/or use #{@cask} you may need to enable their kernel extension in