Merge pull request #3497 from reitermarkus/caveats

Only show `kext` caveat on High Sierra or above.
This commit is contained in:
Markus Reiter 2017-11-29 00:11:00 +01:00 committed by GitHub
commit 2b7ecb4793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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