Skip to content
Snippets Groups Projects
Unverified Commit 2120d285 authored by Rylan Polster's avatar Rylan Polster
Browse files

formuala: update `pour_bottle?` docs

parent 745d7ff8
No related branches found
No related tags found
No related merge requests found
......@@ -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
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment