Cask: Ensure #discontinued? returns a boolean
The `Cask::DSL#discontinued?` method is expected to return a boolean value (`true`/`false`) but it will return `nil` for any casks without a `caveats` block. `nil` is still falsy but this commit ensures that the method will properly return a boolean value in this scenario.
This commit is contained in:
parent
a64f04f678
commit
04203953de
@ -281,7 +281,7 @@ module Cask
|
||||
end
|
||||
|
||||
def discontinued?
|
||||
@caveats&.discontinued?
|
||||
@caveats&.discontinued? == true
|
||||
end
|
||||
|
||||
# @api public
|
||||
|
Loading…
x
Reference in New Issue
Block a user