formuala: update pour_bottle?
docs
This commit is contained in:
parent
745d7ff813
commit
2120d285be
@ -2920,7 +2920,7 @@ class Formula
|
||||
# the {Formula} will be built from source and `reason` will be printed.
|
||||
#
|
||||
# Alternatively, a preset reason can be passed as a symbol:
|
||||
# <pre>pour_bottle? only_if: :clt</pre>
|
||||
# <pre>pour_bottle? only_if: :clt_installed</pre>
|
||||
def pour_bottle?(only_if: nil, &block)
|
||||
@pour_bottle_check = PourBottleCheck.new(self)
|
||||
|
||||
|
@ -68,7 +68,13 @@ A full example:
|
||||
|
||||
```ruby
|
||||
pour_bottle? do
|
||||
reason "The bottle needs the Xcode CLT to be installed."
|
||||
satisfy { MacOS::CLT.installed? }
|
||||
reason "The bottle needs to be installed into #{Homebrew::DEFAULT_PREFIX}."
|
||||
satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX }
|
||||
end
|
||||
```
|
||||
|
||||
Commonly used `pour_bottle?` conditions can be added as preset symbols to the `pour_bottle?` method, allowing them to be specified like this:
|
||||
|
||||
```ruby
|
||||
pour_bottle? only_if: :clt_installed
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user