caveats first-class in DSL, gets own mini-DSL #2426
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make
caveats
a first-class member of the Cask DSL. It no longer has tobe specified with
def caveats
, but can be given ascaveats do ... end
as with
after_install
blocks.In addition, create a mini-DSL which can be used within
caveats
blocks,providing standard messages when manual installers must be used,
reboot-required, etc.
Add alternate form:
caveats
can also accept a compile-time string forsimple cases.
This is 99% compatible with old Casks, as it still works by defining
a
caveats
method. However, all Casks containingcaveats
are cleanedup and adapted according to the new DSL.
Full docs in
CONTRIBUTING.md
.The purpose is to make things easier for Cask authors, as well as to provide
a framework to address issues such as #2350, or the need to login/logout as
discussed in #2416 (because artifact type cannot always predict which
caveats are needed).